How do I add application specific code to Rails' plugin?
        Posted  
        
            by Waseem
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Waseem
        
        
        
        Published on 2010-04-01T05:58:45Z
        Indexed on 
            2010/04/01
            6:03 UTC
        
        
        Read the original article
        Hit count: 418
        
Hi,
I am using facebooker in one of my applications. I want to add some application specific methods to various methods in it? e.g.
In facebooker/lib/facebooker/models/user.rb
module Facebooker
  class User
    # I want to add my methods here. for e.g my_method
  end
end
I can not directly put my_method in the plugin itself since I also want to access my models from there. Not defining the methods in plugin code itself will also be helpful when I upgrade.
© Stack Overflow or respective owner