Deprecation warning with form_tag

Hello everyone, I am using Rails 3 and receiving an deprecation
warning when running the specs of my app. The warning:

****..*F.DEPRECATION WARNING: <% %> style block helpers are
deprecated. Please use <%= %>. (called from
_app_views_sessions_new_html_erb___526016660_85924870_644960759 at /

This message is about the following code:

<% form_tag 'sessions' do %>
  <p><%= image_submit_tag 'login.png', :class => 'login' %></p>
<% end %>

This logs in the user who remains at the same path after the login.

Do you know how to correct the code so I can ensure this code won't
break my app in the future?


<%= form_tag do %>

<% end %>

Thanks for the reply but this didn't work. Instead, I wrote this:

<%= form_tag '/sessions' do -%>
  <p><%= image_submit_tag 'login.png', :class => 'login' %></p>
<% end -%>

And it works and the deprecation method is gone.


watch this