Ruby on Rails Wednesday, April 4, 2012

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?


Thank you
vishnu

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/c0l18JWhwW4J.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment