Sha256: cf1ccbedac6dcf4e86f71d98cbd995281be5ea83b5ab177377332b1ef90c5a29

Contents?: true

Size: 270 Bytes

Versions: 5

Compression:

Stored size: 270 Bytes

Contents

module RailsSettings
  class ScopedSettings < Settings
    def self.for_thing(object)
      @object = object
      self
    end
    
    def self.thing_scoped
      unscoped.where(:thing_type => @object.class.base_class.to_s, :thing_id => @object.id)
    end
 
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails-settings-cached-0.4.1 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.4.0 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.3.2 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.3.1 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.3.0 lib/rails-settings/scoped_settings.rb