class ApplicationController < ActionController::Base
def for_branch(branch)
end
end
*In the above code, i have to call one function which is in application
controller, from one controller. how to call this…its like in all
other
oop language, create one object of an extended class and call the
object.
so can i do like that?
In the above code, i have to call one function which is in application
controller, from one controller. how to call this…its like in all other
oop language, create one object of an extended class and call the object. so
can i do like that?
From the BranchesController you can just call for-branch as
BranchesController is derived from ApplicationController. If it does
not work for you post the code and full error.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.