On 4 April 2012 08:37, amvis <[email protected]> wrote: > class BranchesController < ApplicationController > > def create > > //call for_branch with argument pass > end > > end > > 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?
>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 -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

