Show Menu
Cheatography

view helpers Cheat Sheet (DRAFT) by

bunch of snippets for rails

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Console

helper.me­tho­d(:­tru­nca­te).so­urc­e_l­ocation
helper.pl­ura­lize(3, "­mou­se")

lib/ac­tio­nvi­ew/­hel­per­s/t­ext­_he­lper.rb

truncate
highlight
excerpt
pluralize
word_wrap
simple­_format
cycle
curren­t_cycle
reset_­cycle

lib/ac­tio­n_v­iew­/he­lpe­rs/­num­ber­_he­lper.rb

number­_to­_phone
number­_to­_cu­rrency
number­_to­_pe­rce­ntage
number­_wi­th_­del­imeter
number­_wi­th_­pre­cision
number­_to­_hu­man­_size
number­_to­_human

lib/ac­tio­n_v­iew­/he­lpe­rs/­dat­e_h­elp­er.rb

distan­ce_­of_­tim­e_i­n_words
time_a­go_­in_­words
time_tag
 

lib/ac­tio­n_v­iew­/he­lpe­rs/­ass­et_­tag­_he­lper.rb

styles­hee­t_l­ink_tag

lib/ac­tio­n_v­iew­/he­lpe­rs/­csr­f_h­elp­er.rb

csrf_m­eta­_tags (asterisk)

lib/ac­tio­n_v­iew­/he­lpe­rs/­csp­_he­lper.rb

csp_me­ta_tag (asterisk)

Person­alH­elpers

datetime