eelixir form_tag, link

This commit is contained in:
Louis Pilfold 2015-03-16 23:06:58 +00:00
parent 7746cec77c
commit 1f0932bba5
2 changed files with 24 additions and 4 deletions

View File

@ -3,13 +3,23 @@ priority -50
extends html
snippet % "<% %>" w
<% ${0} %>
<% $0 %>
endsnippet
snippet = "<%= %>" w
<%= ${1} %>
<%= $0 %>
endsnippet
snippet end "<% end %>" w
<% end %>
<% end %>
endsnippet
snippet ft "form_tag" w
<%= form_tag(${1:"${2:/users}"}, method: ${3::post}) %>
$0
</form>
endsnippet
snippet lin "link" w
<%= link ${1:"${2:Submit}"}, to: ${3:"${4:/users}"}, method: ${5::delete}) %>
endsnippet

View File

@ -1,6 +1,16 @@
snippet %
<% ${0} %>
snippet =
<%= ${1} %>
<%= ${0} %>
snippet end
<% end %>
snippet ft
<%= form_tag(${1:"/users"}, method: ${2::post}) %>
${0}
</form>
snippet lin
<%= link "${1:Submit}", to: ${2:"/users"}, method: ${3::delete}) %>