Module: SmartSettings::Naming

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/smart_settings/naming.rb

Instance Method Summary collapse

Instance Method Details

#permitted_attributesObject



27
28
29
# File 'lib/smart_settings/naming.rb', line 27

def permitted_attributes
  attribute_names - ['var']
end

#to_paramObject



23
24
25
# File 'lib/smart_settings/naming.rb', line 23

def to_param
  var.to_s.parameterize
end

#varObject



19
20
21
# File 'lib/smart_settings/naming.rb', line 19

def var
  self.class.name.to_s.demodulize.sub('Settings', '')
end