Forum: Ruby on Rails Re: Re: page.replace_html "#{var_containing_id_name}", :part

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jason T. (Guest)
on 2006-04-07 21:43
(Received via mailing list)
> remember, the view templates have access to the attributes defined
> in the controller

Actually, its more like this: I have a list page. Each row is a div
whose id is the id of the record it represents. When you click on the
'edit' link in a row, I want to page.replace_html the div for that
record. The only way I know the id of the div is from params[:id]


page.replace_html params[:id], :partial => "edit"

doesn't work.

: )

Chris H. (Guest)
on 2006-04-07 21:52
(Received via mailing list)
def show_edit_form
  @user = User.find(params[:id])

  page.replace, :partial => "edit_form"


<%= start_form_tag :action => :update %>
<%= text_field :user, :name %>
<%= end_form_tag %>
Chris H. (Guest)
on 2006-04-07 21:55
(Received via mailing list)
typo, sorry...

page.replace, :partial => "edit_form"
This topic is locked and can not be replied to.