Damian Terentyev wrote:
> I want to have an action to process an AJAX request. Naturally, it is
> good to render a partial as the response. The problem is, Rails
> supposes all actions to end with render :action otherwise it
> automatically renders the default action. How to cancel such behaviour
> and make it happy with just rendering the partial and finishing?
This requires the view to call a wrapper that calls Ajax.Request, not
Ajax.Response, but that''s just my preference:
render :update => do |page|
page.replace_html ''my_div'', :partial =>
''my_partial''
end
Ajax! The Guilty Pleasure of Rails!!
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---