mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Move Setting::Migratable concern to data_migration instead
This commit is contained in:
parent
5d429aaec3
commit
558faf4934
3 changed files with 88 additions and 108 deletions
|
@ -3,7 +3,6 @@ class SettingEntry < ApplicationRecord
|
|||
validates :format, presence: true
|
||||
validates :group, presence: true
|
||||
validate :valid_value_format
|
||||
include Concerns::Settings::Migratable
|
||||
|
||||
VALUE_FORMATS = {
|
||||
string: :string_format,
|
||||
|
@ -24,6 +23,7 @@ class SettingEntry < ApplicationRecord
|
|||
end
|
||||
|
||||
# rubocop:disable Style/MethodMissingSuper
|
||||
# rubocop:disable Style/MissingRespondToMissing
|
||||
def self.method_missing(method, *args)
|
||||
super(method, *args)
|
||||
rescue NoMethodError
|
||||
|
@ -36,6 +36,7 @@ class SettingEntry < ApplicationRecord
|
|||
stg ? stg.retrieve : nil
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/MissingRespondToMissing
|
||||
# rubocop:enable Style/MethodMissingSuper
|
||||
|
||||
# Validators
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue