Old usage:
<% form_tag %>
...
<% end %>
<% form_for %>
....
<% end %>
New usage:
<%= form_tag %>
...
<% end %>
<%= form_for %>
....
<% end %>
(I was learning Head First Rails and know the differences in this list)
I knew that scriptlet don’t need = in the <>, but if <%= form_tag %> is not a scriptlet, why does it need a <% end %>?
Does anyone have ideas about this?
Firstly, I’ve got no idea what a ‘scriplet’ is; anyway, this was a change in rails 3.0 – see the release notes: http://guides.rubyonrails.org/3_0_release_notes.html#helpers-with-blocks.