Files
grecia/lib/tasks/settings.rake
Bertocq 35c156ba7a Create setting to enable/disable attached documents
Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
2018-04-10 12:46:09 +02:00

17 lines
590 B
Ruby

namespace :settings do
desc "Changes Setting key per_page_code for per_page_code_head"
task per_page_code_migration: :environment do
per_page_code_setting = Setting.where(key: 'per_page_code').first
Setting['per_page_code_head'] = per_page_code_setting&.value.to_s if Setting.where(key: 'per_page_code_head').first.blank?
per_page_code_setting.destroy if per_page_code_setting.present?
end
desc "Create new Attached Documents feature setting"
task create_attached_documents_setting: :environment do
Setting['feature.allow_attached_documents'] = true
end
end