> 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] Unfortunately, page.replace_html params[:id], :partial => "edit" doesn't work. : ) Jason
on 2006-04-07 21:43
on 2006-04-07 21:52
def show_edit_form @user = User.find(params[:id]) end show_edit_form.rjs page.replace @user.id, :partial => "edit_form" end _edit_form.rhtml <%= start_form_tag :action => :update %> <%= text_field :user, :name %> ... <%= end_form_tag %>
on 2006-04-07 21:55
typo, sorry... show_edit_form.rjs ---------- page.replace @user.id, :partial => "edit_form"