Module: SmartSettings::Persistence

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

Instance Method Summary collapse

Instance Method Details

#settingsObject



32
33
34
35
36
37
# File 'lib/smart_settings/persistence.rb', line 32

def settings
  return unless settings_table_exists?

  valid = self.attribute_names.reject { |i| i == 'var' }
  Setting.where(settable_type: self.class.name, settable_id: id, var: valid)
end