app/models/motor/api_config.rb in motor-admin-0.3.9 vs app/models/motor/api_config.rb in motor-admin-0.3.10
- old
+ new
@@ -2,14 +2,14 @@
module Motor
class ApiConfig < ::Motor::ApplicationRecord
encrypts :credentials if defined?(::Motor::EncryptedConfig)
- serialize :credentials, Motor::HashSerializer
- serialize :preferences, Motor::HashSerializer
-
attribute :preferences, default: -> { HashWithIndifferentAccess.new }
attribute :credentials, default: -> { HashWithIndifferentAccess.new }
+
+ serialize :credentials, Motor::HashSerializer
+ serialize :preferences, Motor::HashSerializer
has_one :form, dependent: nil, foreign_key: :api_config_name, primary_key: :name, inverse_of: :api_config
scope :active, -> { where(deleted_at: nil) }