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 extends html
snippet % "<% %>" w snippet % "<% %>" w
<% ${0} %> <% $0 %>
endsnippet endsnippet
snippet = "<%= %>" w snippet = "<%= %>" w
<%= ${1} %> <%= $0 %>
endsnippet endsnippet
snippet end "<% end %>" w 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 endsnippet

View File

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