I've always used form_tag alongside form_for, each having their place in the problem-solving domain. However, when recently evaluating formtastic, which doesn't work with form_tag I realised that I could use form_for instead of form_tag by using form_for with a symbol (or string) instead of a model instance variable.
For example, instead of
<%= form_tag sessions_path do %> <%= label_tag :email %> <%= text_field_tag :email, params[:email] %> <%= label_tag :password %> <%= password_field_tag :password %> <%= submit_tag "Log in" %></div> <% end %>
you can do
<%= form_for :session, url: sessions_path do |f| %> <%= f.label :email %> <%= f.text_field :email, value: params[:email] %> <%= f.label :password %> <%= f.password_field :password %> <%= f.submit "Log in" %> <% end %>
The only difference I can see is that the params hash has the form fields inside a hash named by the first argument to form_for (in the example case, :session). You could argue that is cleaner because the form fields are namespaced.
On the surface using form_for instead of form_tag seems like a good idea because there's only one syntax to worry about and it makes all forms consistent. However, I guess there could be reasons not immediately apparent to me why using form_for in this way may not be the same as using form_tag. I don't know what those reasons are so thought I'd ask here - perhaps someone more experienced has a view on this?
If there are scenarios where you just have to use form_tag then that would mean those scenarios could not be dealt with using formtastic.