Class: RailsSettings::ScopedSettings
- Inherits:
-
Settings
- Object
- ActiveRecord::Base
- Settings
- RailsSettings::ScopedSettings
show all
- Defined in:
- lib/rails-settings/scoped_settings.rb
Class Method Summary
collapse
Methods inherited from Settings
[], []=, all, destroy, merge!, method_missing, object, #value, #value=
Class Method Details
.for_thing(object) ⇒ Object
3
4
5
6
|
# File 'lib/rails-settings/scoped_settings.rb', line 3
def self.for_thing(object)
@object = object
self
end
|
.thing_scoped ⇒ Object
8
9
10
|
# File 'lib/rails-settings/scoped_settings.rb', line 8
def self.thing_scoped
Settings.scoped_by_thing_type_and_thing_id(@object.class.base_class.to_s, @object.id)
end
|