RailsCasts Pro episodes are now free!

Learn more or hide this

Beengie's Profile

GitHub User: Beengie

Comments by Beengie

Avatar

I am getting an undefined method 'link_to_function' for in my views/surveys/_question_fields.html.erb at this line.

ruby
<%= link_to_remove_fields "remove", f %><br />

Here is the application_helper.rb

ruby
def link_to_remove_fields(name, f)
  f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
end