Class: ScopedSettings

Inherits:
Settings
  • Object
show all
Defined in:
lib/settings.rb

Class Method Summary collapse

Methods inherited from Settings

[], []=, all, destroy, merge!, method_missing, reload, target, target_scoped, #value, #value=

Class Method Details

.for_target(target) ⇒ Object



119
120
121
122
# File 'lib/settings.rb', line 119

def self.for_target(target)
  @target = target
  self
end

.target_idObject



124
125
126
# File 'lib/settings.rb', line 124

def self.target_id
  @target.id
end

.target_typeObject



128
129
130
# File 'lib/settings.rb', line 128

def self.target_type
  @target.class.base_class.to_s
end