Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/acts_as_singleton.rb
Class Method Summary collapse
-
.acts_as_singleton ⇒ Object
Class method to provide a more Rails-like experience.
Class Method Details
.acts_as_singleton ⇒ Object
Class method to provide a more Rails-like experience. Merely includes the ActiveRecord::Singleton
module.
class HomepageSettings < ActiveRecord::Base
acts_as_singleton # Equivalent to "include ActiveRecord::Singleton".
end
89 90 91 |
# File 'lib/acts_as_singleton.rb', line 89 def acts_as_singleton include Singleton end |