Class: RubySettings::ScopedSettings
- Inherits:
-
CachedSettings
- Object
- ActiveRecord::Base
- Settings
- CachedSettings
- RubySettings::ScopedSettings
- Defined in:
- lib/ruby-settings/scoped_settings.rb
Class Method Summary collapse
Methods inherited from CachedSettings
[], cache_key, #cache_key, cache_prefix, #expire_cache, #rewrite_cache, save_default
Methods included from ConfigurationHelpers
Methods inherited from Settings
[], []=, destroy, get_all, merge!, method_missing, object, #value, #value=, where
Class Method Details
.for_thing(object) ⇒ Object
3 4 5 6 |
# File 'lib/ruby-settings/scoped_settings.rb', line 3 def self.for_thing(object) @object = object self end |
.thing_scoped ⇒ Object
8 9 10 |
# File 'lib/ruby-settings/scoped_settings.rb', line 8 def self.thing_scoped unscoped.where(thing_type: @object.class.base_class.to_s, thing_id: @object.id) end |