Sha256: 389815c0696cad814006de52e9317293a78d1eb273c2bbed7e9fa8ffb8770a55

Contents?: true

Size: 279 Bytes

Versions: 1

Compression:

Stored size: 279 Bytes

Contents

class ScopedSettings < Settings
  def self.for_target(target)
    @target = target
    self
  end
  
  def self.target_id
    @target.is_a?(Class) ? nil : @target.id
  end
  
  def self.target_type
    @target.is_a?(Class) ? @target.name : @target.class.base_class.to_s
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledermann-rails-settings-1.2.0 lib/rails-settings/scoped_settings.rb