dhaval,
> I want to know if there is ne method or way by which we can call 2
> methods using hte action function
> something like :action
=>''create'',''update''
Do you have a real use case?
I''ve never needed this except for AJAX related actions where you can
use code like this :
In the view:
------------
<%= link_to_remote "1 click, 2 actions",
:url => { :action => "first"},
:complete => remote_function(:url => { :action => :second })
%>
In the controller :
-------------------
def first
# non AJAX stuff here
render (:update) {|page|page.alert("foo")}
end
def second
render (:update) {|page|page.alert("bar")}
end
Alain Ravet
--------
blog.ravet.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---