[Rails] Re: self.included like a constructor method that gets called when a module is included in a class?

2011-05-09 Thread Frederick Cheung
On May 9, 8:03 pm, John Merlino li...@ruby-forum.com wrote: Hey all, Let's say you have a controller class and you include a module: module AuthenticationSystem   def self.included(base)     base.send :helper_method, :current_user   end end The point of this is to call helper_method

[Rails] Re: self.included like a constructor method that gets called when a module is included in a class?

2011-05-09 Thread John Merlino
The point of this is to call helper_method :current_user. You can look up what helper_method does in the rails docs. Fred ok so basically this allows you to use current_user in your views. thanks for response -- Posted via http://www.ruby-forum.com/. -- You received this message because