2012-08-16 23:41:25 -04:00
|
|
|
# .erb and .rhmtl files
|
|
|
|
|
|
|
|
# Includes html.snippets
|
2016-10-02 07:37:21 -04:00
|
|
|
extends html
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Rails *****************************
|
|
|
|
snippet rc
|
2013-11-16 14:45:48 -05:00
|
|
|
<% ${0} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rce
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet %
|
2013-11-16 14:45:48 -05:00
|
|
|
<% ${0} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet =
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet end
|
2013-11-16 14:45:48 -05:00
|
|
|
<% end %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ead
|
|
|
|
<% ${1}.each do |${2}| %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
|
|
|
snippet for
|
|
|
|
<% for ${2:item} in ${1} %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
|
|
|
snippet rp
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render partial: '${0:item}' %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rpl
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render partial: '${1:item}', locals: { :${2:name} => '${3:value}'${0} } %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rps
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render partial: '${1:item}', status: ${0:500} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rpc
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render partial: '${1:item}', collection: ${0:items} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lia
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= link_to '${1:link text...}', action: '${0:index}' %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet liai
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= link_to '${1:link text...}', action: '${2:edit}', id: ${0:@item} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lic
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= link_to '${1:link text...}', controller: '${0:items}' %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lica
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= link_to '${1:link text...}', controller: '${2:items}', action: '${0:index}' %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet licai
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= link_to '${1:link text...}', controller: '${2:items}', action: '${3:edit}', id: ${0:@item} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet yield
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= yield ${1::content_symbol} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet conf
|
|
|
|
<% content_for :${1:head} do %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
|
|
|
snippet cs
|
|
|
|
<%= collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+> %>
|
|
|
|
snippet ct
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= content_tag '${1:DIV}', ${2:content}${0:,options} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ff
|
2013-04-26 12:17:22 -04:00
|
|
|
<%= form_for @${1:model} do |f| %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
2013-07-17 19:06:05 -04:00
|
|
|
snippet ffi
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.input :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffcb
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.check_box :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffe
|
|
|
|
<% error_messages_for :${1:model} %>
|
2013-04-26 12:17:22 -04:00
|
|
|
|
|
|
|
<%= form_for @${2:model} do |f| %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
|
|
|
snippet ffff
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.file_field :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffhf
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.hidden_field :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffl
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.label :${2:attribute}, '${0:$2}' %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffpf
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.password_field :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffrb
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.radio_button :${2:attribute}, :${0:tag_value} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffs
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.submit "${0:submit}" %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ffta
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.text_area :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet fftf
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= ${1:f}.text_field :${0:attribute} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet fields
|
2013-04-26 12:17:22 -04:00
|
|
|
<%= fields_for :${1:model}, @$1 do |${2:f}| %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
<% end %>
|
|
|
|
snippet i18
|
2013-11-16 14:45:48 -05:00
|
|
|
I18n.t('${1:type.key}')
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet it
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= image_tag "${1}"${0} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet jit
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= javascript_include_tag ${0::all} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet jsit
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= javascript_include_tag "${0}" %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lim
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to ${1:model}.${2:name}, ${3:$1}_path(${0:$1}) %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet linp
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to "${1:Link text...}", ${2:parent}_${3:child}_path(${4:@$2}, ${0:@$3}) %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet linpp
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to "${1:Link text...}", ${2:parent}_${3:child}_path(${0:@$2}) %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lip
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to "${1:Link text...}", ${2:model}_path(${0:@$2}) %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lipp
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to "${1:Link text...}", ${0:model}s_path %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet lt
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= link_to "${1:name}", ${0:dest} %>
|
2013-08-03 08:50:12 -04:00
|
|
|
snippet ntc
|
|
|
|
<%= number_to_currency(${1}) %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet ofcfs
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${0:selected_value} %>
|
2014-04-18 08:58:02 -04:00
|
|
|
snippet ofs
|
|
|
|
<%= options_for_select ${1:collection}, ${2:value_method} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rf
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render file: "${1:file}"${0} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet rt
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= render template: "${1:file}"${0} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet slt
|
2015-12-08 08:20:04 -05:00
|
|
|
<%= stylesheet_link_tag ${1::all}, cache: ${0:true} %>
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet sslt
|
2013-11-16 14:45:48 -05:00
|
|
|
<%= stylesheet_link_tag "${0}" %>
|
2013-07-17 19:06:05 -04:00
|
|
|
snippet if
|
|
|
|
<% if ${1} %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2013-07-17 19:06:05 -04:00
|
|
|
<% end %>
|
|
|
|
snippet ife
|
|
|
|
<% if ${1} %>
|
|
|
|
${2}
|
|
|
|
<% else %>
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2013-07-17 19:06:05 -04:00
|
|
|
<% end %>
|
2014-10-14 09:30:33 -04:00
|
|
|
snippet pry
|
2014-10-31 17:30:24 -04:00
|
|
|
<% require 'pry'; binding.pry %>
|