multiple values for block parameter

Written by steve on 07-31-2008 at 08:35 PM

Not that you would ever do this, but have you ever known anyone who wrote code like:

      
      <%= form_tag(:action => 'inaction') do |f| %>
      
      

Well, that’s the function call signature for form_for, and sometime muscle-memory is a bad thing. Adding the |f| parameter produces the odd error:

Multiple values for block parameter

Just in case you were doing some head scratching. And by the way, it’s a benign warning so you won’t get any code breakage unless you really use the parameter as the object for your form helpers.

Permalink

 

0 comments

name (opt.)
email (req.)
comment
what color is the sky?

blog home