Trouble implementing inline rjs

def input_event
   @person = Person.find(params[:id])
   event = Event.new(params[:event])
   if event.save
     return if request.xhr?
     render(:update){|page| page.input(@person)}
   end
end

Controller Helper

def input(person)
   page.replace_html("event_list", :partial => "events", :object =>
person)
   page.replace_html("input_list", :partial => "inputs", :object =>
person)
end

However, I can't get either of these inline methods to work. Is there
anything else I need to change?

I saw a technique at railsconf europe last year, which (if I remember correctly) went something along the lines of

def input
   update_page do |page|
     page.replace_html("event_list", :partial => "events", :object =>person)
     page.replace_html("input_list", :partial => "inputs", :object =>person)
   end
end

render :update do |page|
   page << input
end

Fred