I am trying to get this to work:
def do_button(event_type)
varname = event_type.name.underscore
humanname = event_type.new.event_name_string
form_for (@user, :url => “do_#{varname}_user_path(@user)”) do |
form|
submit_tag “I got my #{humanname} today”
end
end
My view has this in it:
<li>
<% do_button(Mammogram) %>
</li>
But I keep getting this error in the log from the form_for line inside
the helper:
ActionView::TemplateError (undefined local variable or method
`_erbout’ for ActionView::Base:0x357355c) in users/
_mammogram.html.erb.
Can’t figure out what to do. Anyone?