I want to know if it is possible to call an action that belongs to a
controller from another action that belongs to a different controller.
I have the “search” action in the controller of Model A , and I need
to cal that action from the action “register”, but action “register”
belongs to the controler of Model B. Also I need to pass some
parameters from action register to execute action search
class MyController < ApplicationController
include MyModule
def search
my_method(params)
end
end
just check whether your module is loaded or add require to your
config/environment.rb file
tom
On Aug 26, 2011, at 20:49 , Angelo C. wrote:
I want to know if it is possible to call an action that belongs to a
You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.