Skip to content

Commit 036dc1a

Browse files
committed
Merge pull request honza#99 from rekky/master
Adjust eruby snippets
2 parents 99f8964 + 61313dd commit 036dc1a

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

snippets/eruby.snippets

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44

55
# Rails *****************************
66
snippet rc
7-
<% ${1} -%>
7+
<% ${1} %>
88
snippet rce
99
<%= ${1} %>${2}
1010
snippet end
11-
<% end -%>${1}
11+
<% end %>${1}
12+
snippet ead
13+
<% ${1}.each do |${2}| %>
14+
${3}
15+
<% end %>
1216
snippet for
1317
<% for ${2:item} in ${1} %>
1418
${3}
@@ -40,19 +44,19 @@ snippet conf
4044
snippet cs
4145
<%= collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+> %>
4246
snippet ct
43-
<%= content_tag '${1:DIV}', ${2:content}${3:,options} -%>
47+
<%= content_tag '${1:DIV}', ${2:content}${3:,options} %>
4448
snippet ff
45-
<% form_for @${1:model} do |f| -%>
49+
<% form_for @${1:model} do |f| %>
4650
${2}
47-
<% end -%>
51+
<% end %>
4852
snippet ffcb
4953
<%= ${1:f}.check_box :${2:attribute} %>
5054
snippet ffe
51-
<% error_messages_for :${1:model} -%>
55+
<% error_messages_for :${1:model} %>
5256

53-
<% form_for @${2:model} do |f| -%>
57+
<% form_for @${2:model} do |f| %>
5458
${3}
55-
<% end -%>
59+
<% end %>
5660
snippet ffff
5761
<%= ${1:f}.file_field :${2:attribute} %>
5862
snippet ffhf
@@ -70,13 +74,13 @@ snippet ffta
7074
snippet fftf
7175
<%= ${1:f}.text_field :${2:attribute} %>
7276
snippet fields
73-
<% fields_for :${1:model}, @$1 do |${2:f}| -%>
77+
<% fields_for :${1:model}, @$1 do |${2:f}| %>
7478
${3}
75-
<% end -%>
79+
<% end %>
7680
snippet ff
77-
<%= form_for @${1:model} do |f| -%>
81+
<%= form_for @${1:model} do |f| %>
7882
${2}
79-
<% end -%>
83+
<% end %>
8084
snippet i18
8185
I18n.t('${1:type.key}')${2}
8286
snippet it

0 commit comments

Comments
 (0)