Message from discussion
Railscasts' complex forms - refactoring with LowPro
MIME-Version: 1.0
Message-ID: <ca475362-eae3-4480-9354-05e698268803@x69g2000hsx.googlegroups.com>
Date: Thu, 24 Jan 2008 05:39:15 -0800 (PST)
Received: by 10.78.40.10 with SMTP id n10mr33030hun.25.1201181955314; Thu, 24
Jan 2008 05:39:15 -0800 (PST)
X-IP: 143.167.136.151
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe)
Subject: Railscasts' complex forms - refactoring with LowPro
From: Tim Chater <t.cha...@gmail.com>
To: Low Pro <low-pro@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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?