Rails 4: passing multiple arguments to partial
I'm able to pass a single argument from a view to a partial, but for some
reason when I add a second it is undefined (nil class).
Here's how I call the partial in the view:
<%= render 'project_form', locals: {project: @project, form_method:
'patch'} %>
Here's the top of the partial (_project_form.html.erb):
<%= logger.debug( @form_method ) %>
This prints "true" in the view, and logs nothing (a blank line) in the log.
Why isn't it receiving the second argument? I can debug @project and it's
the class I expect.
No comments:
Post a Comment