In the episode 74, Ryan has a model “project” that can have many “tasks”, and he uses link_to_function to dynamically add a field in the form for a new Task.
In order to do that he created a helper called add_task_link. The code of the method is:
# 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 The problem i have here is that i can't figure out where does this Task object, which he instantiate with Task.new in the line i highlighted, come from. Thanks,