38 lines
755 B
Plaintext
38 lines
755 B
Plaintext
snippet t
|
|
%table
|
|
%tr
|
|
%th
|
|
${1:headers}
|
|
%tr
|
|
%td
|
|
${2:headers}
|
|
snippet ul
|
|
%ul
|
|
%li
|
|
${1:item}
|
|
%li
|
|
snippet rp
|
|
= render :partial => "${1:item}"
|
|
snippet rpc
|
|
= render :partial => "${1:item}", :collection => ${2:@$1s}
|
|
snippet rpl
|
|
= render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}
|
|
snippet rpo
|
|
= render :partial => "${1:item}", :object => ${2:@$1}
|
|
snippet l link_to
|
|
= link_to ${1:name}, ${2:url}
|
|
snippet m mail_to
|
|
= mail_to ${1:email_address}, ${2:name}
|
|
snippet m mail_to subject body
|
|
= mail_to ${1:email_address}, ${2:name}, :subject => ${3:subject}, :body => ${4:body}
|
|
snippet ife
|
|
- if ${1:condition}
|
|
${2}
|
|
- else
|
|
${3}
|
|
snippet ifp
|
|
- if ${1:condition}.presence?
|
|
${2}
|
|
snippet ntc
|
|
= number_to_currency(${1})
|