I am having a problem in Rails .. I might be a silly question, but pls give me suggestions.
What is the difference between:
<%= form_tag("path", :method=>'post') do %>
<% end %>
and:
<% form_tag("path", :method=>'post') do %>
<% end %>
Please give me some suggestions.
They do the same thing. The former is the Rails 3 syntax, the latter targets Rails versions < 3.
Rails 3 still support the syntax without the leading equal but it currently prints a deprecation warning. The Rails 2 syntax will be removed in Rails 3.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With