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 /
home/orygens/code/narciso/app/views/sessions/new.html.erb:9)
.F.F…
.

This message is about the following code:

<% form_tag ‘sessions’ do %>

<%= image_submit_tag 'login.png', :class => 'login' %>

<% 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?

Thanks!

On Mon, Sep 13, 2010 at 1:47 PM, rodrigo3n [email protected] wrote:

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
<% form_tag ‘sessions’ do %>

<%= form_tag do %>

<% end %>


Greg D.
destiney.com | gregdonald.com

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

<%= form_tag ‘/sessions’ do -%>

<%= image_submit_tag 'login.png', :class => 'login' %>

<% end -%>

And it works and the deprecation method is gone.

Thanks!

watch this

Thanks!