Call 2 methods using action

hello

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’

please let me know

thanks

dhaval

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 R.

blog.ravet.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs