Skip to content

Instantly share code, notes, and snippets.

@kezek
Created March 20, 2013 19:09
Show Gist options
  • Save kezek/5207525 to your computer and use it in GitHub Desktop.
Save kezek/5207525 to your computer and use it in GitHub Desktop.
#this is singleton pattern
module MyModule
self.method1
'method1'
end
self.method2
'method2'
end
self.method3
'method3'
end
end
# I want to autoload this module in Rails 3
# so that I can call these methods anywhere in
# my models
# i.e. MyModule.method1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment