Sha256: a68a87d8ee61c6199286b3364538118a9115c2dbdf7626b4056952a25a203d30

Contents?: true

Size: 255 Bytes

Versions: 11

Compression:

Stored size: 255 Bytes

Contents

module RailsSettings
  class ScopedSettings < Base
    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

11 entries across 11 versions & 2 rubygems

Version Path
jdx-rails-settings-0.7.4 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.7.2 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.7.1 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.7.0 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.6 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.5 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.4 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.3 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.2 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.1 lib/rails-settings/scoped_settings.rb
rails-settings-cached-0.6.0 lib/rails-settings/scoped_settings.rb