开发者

rails - what does - multiple values for a block parameter (0 for 1) - mean?

I keep getting this error on Heroku but not locally. any idea why that 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's some of the template:

<div id="account-signin">
 <%= form_tag(new_user_session_path, :method=>'post', :id => 'user_signin') do |f| %>
  <table>
   <tr>
    <td>
     <table>
      <tr>
       <td>
        &开发者_如何学JAVAlt;%= label_tag 'Email' %>
       </td>
       <td>
        <%= label_tag 'Password' %>
       </td>


The block given to the form_tag method doesn't take any parameters. The error is telling you that your block requires an argument, but form_tag doesn't have any arguments to give it. Remove the "|f|" bit at the end of the form_tag line and it should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜