Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Railscasts' complex forms - refactoring with LowPro

View Parsed - Show only message text

MIME-Version: 1.0
Message-ID: <3ac854a4-d8a5-413e-9adc-1a7aa5d6ef7b@i3g2000hsf.googlegroups.com>
Date: Thu, 24 Jan 2008 05:53:46 -0800 (PST)
Received: by 10.86.27.9 with SMTP id a9mr63461fga.29.1201182826478; Thu, 24 
	Jan 2008 05:53:46 -0800 (PST)
In-Reply-To: <ca475362-eae3-4480-9354-05e698268803@x69g2000hsx.googlegroups.com>
X-IP: 143.167.136.151
References: <ca475362-eae3-4480-9354-05e698268803@x69g2000hsx.googlegroups.com>
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: Re: 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

I should point out that I have sort of been able to solve this by
amending the new action of the tasks controller and adding this to its
responds_to block:

format.js do
  render :update do |page|
    page.insert_html :bottom, :tasks, :partial => 'projects/
task', :object => Task.new
  end
end

The only problem with this is that I've used a remote link, so it's
had to go back to the server, rather than all be done client side as
it was before... is there another way?


On Jan 24, 1:39 pm, Tim Chater <t.cha...@gmail.com> wrote:
> 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?
>

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google