Go to Google Groups Home    Low Pro
Railscasts' complex forms - refactoring with LowPro

Tim Chater <t.cha...@gmail.com>

Hello

I'm sure some of you are familiar with Ryan Bates' weekly tutorials on
railscasts.com. A few months ago there was a three-part series
(episodes 73-75) about creating/editing multiple models in one form.
I'm trying to achieve the same but not use obtrusive things like
link_to_function.

Mostly this has been easy enough, but I'm not sure how to rewrite the
add_task_link function (which Ryan makes into a helper at the end of
episode 74):

# projects_helper.rb
def add_task_link(name)
  link_to_function name do |page|
    page.insert_html :bottom, :tasks, :partial => 'task', :object =>
Task.new
  end
end

How do I deal with this?

Thanks.