Class: Settingify::DbSyncer
- Inherits:
-
Object
- Object
- Settingify::DbSyncer
- Defined in:
- lib/settingify/db_syncer.rb
Overview
Syncs defined settings with DB.
Very useful for copying defined settings in initializer to DB with goal for ability to edit through admin panel.
You may call this class manually in rails console or use built-in rake task: bundle exec rake settingify:sync
Syncing means adding new DB entries for settings which not exists yet.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/settingify/db_syncer.rb', line 16 def call settings_list.each(&method(:process_setting)) end |