2016-06-26 11:12:36 +00:00
|
|
|
extends html
|
|
|
|
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet % <% %>
|
2015-03-14 20:02:10 +00:00
|
|
|
<% ${0} %>
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet = <%= %>
|
2015-07-13 10:22:46 +00:00
|
|
|
<%= ${0} %>
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet # <%# %>
|
|
|
|
<%# ${0} %>
|
2015-03-14 20:02:10 +00:00
|
|
|
snippet end
|
|
|
|
<% end %>
|
2015-07-13 10:22:46 +00:00
|
|
|
snippet for
|
|
|
|
<%= for ${1:item} <- ${2:items} ${3:@conn} do %>
|
|
|
|
${0}
|
|
|
|
<% end %>
|
|
|
|
snippet if
|
|
|
|
<%= if ${1} do %>
|
2017-02-11 13:01:38 +00:00
|
|
|
${0:${VISUAL}}
|
2015-07-13 10:22:46 +00:00
|
|
|
<% end %>
|
|
|
|
snippet ife
|
|
|
|
<%= if ${1} do %>
|
2017-02-11 13:01:38 +00:00
|
|
|
${2:${VISUAL}}
|
2019-05-17 14:09:13 +00:00
|
|
|
<% else %>
|
2015-07-13 10:22:46 +00:00
|
|
|
${0}
|
|
|
|
<% end %>
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet cond
|
|
|
|
<%= cond do %>
|
|
|
|
<% ${1} -> %>
|
|
|
|
${2:${VISUAL}}
|
|
|
|
|
|
|
|
<% true -> %>
|
|
|
|
${0}
|
|
|
|
<% end %>
|
|
|
|
snippet unless
|
|
|
|
<%= unless ${1} do %>
|
|
|
|
${0:${VISUAL}}
|
|
|
|
<% end %>
|
|
|
|
snippet ft form_tag
|
2015-07-13 10:22:46 +00:00
|
|
|
<%= form_tag(${1:"/users"}, method: ${2::post}) %>
|
|
|
|
${0}
|
|
|
|
</form>
|
2021-05-05 08:25:00 +00:00
|
|
|
|
|
|
|
snippet sl select
|
|
|
|
<%= select ${1:f}, :${2:field}, ${3:[{"key", "value"}]}, prompt: ${4:"Prompt"} %>
|
|
|
|
|
|
|
|
snippet sb submit
|
|
|
|
<%= submit ${1:"Submit"} %>
|
|
|
|
|
|
|
|
snippet rb radio_button
|
|
|
|
<%= radio_button ${1:f}, :${2:field}, ${3:"value"} %>
|
|
|
|
|
|
|
|
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet et error_tag
|
|
|
|
<%= error_tag ${1:f}, :${2:field} %>
|
|
|
|
snippet ti text_input
|
|
|
|
<%= text_input ${1:f}, :${2:field} %>
|
|
|
|
snippet la label
|
|
|
|
<%= label ${1:f}, :${2:field}, "${3:Label}" %>
|
|
|
|
snippet pi password_input
|
|
|
|
<%= password_input ${1:f}, :${2:password} %>
|
|
|
|
snippet render
|
|
|
|
<%= render "${1:index}.html", ${2:var: @var} %>
|
|
|
|
snippet lin link
|
2015-07-13 10:22:46 +00:00
|
|
|
<%= link "${1:Submit}", to: ${2:"/users"}, method: ${3::delete} %>
|
2019-08-22 15:36:17 +00:00
|
|
|
snippet ff form_for
|
2015-07-13 10:22:46 +00:00
|
|
|
<%= form_for @changeset, ${1:"/users"}, fn f -> %>
|
|
|
|
${0}
|
|
|
|
|
|
|
|
<%= submit "Submit" %>
|
|
|
|
<% end %>
|
2017-11-24 13:54:40 +00:00
|
|
|
snippet pry
|
|
|
|
<% require IEx; IEx.pry %>
|