Rails - what does it mean - a few values ​​for a block parameter (0 for 1) - mean?

I keep getting this error on Heroku, but not locally. any idea why this would be?

/disk1/home/slugs/352624_0e85669_cd2f-9e7b2ba0-45de-479f-b275-af88d0b560c6/mnt/app/views/sessions/_new.html.erb:2: warning: multiple values for a block parameter (0 for 1) 

from / home / slugs / 352624_0e85669_cd2f-9e7b2ba0-45de-479f-b275-af88d0b560c6 / mnt / .bundle / gems / ruby ​​/ 1.8 / gems / actionpack-3.0.0 / lib / action_view / helpers / capture_helper.rb: 39

Here are some of the templates:

 <div id="account-signin"> <%= form_tag(new_user_session_path, :method=>'post', :id => 'user_signin') do |f| %> <table> <tr> <td> <table> <tr> <td> <%= label_tag 'Email' %> </td> <td> <%= label_tag 'Password' %> </td> 
+4
source share
1 answer

The block specified by form_tag does not accept any parameters. The error tells you that your block requires an argument, but form_tag has no arguments. Remove "| f |" bit at the end of the form_tag line and it should work.

+26
source

Source: https://habr.com/ru/post/1332164/


All Articles