diff --git a/app/models/chorus_configuration.rb b/app/models/chorus_configuration.rb index de2602385..3447e7bc1 100644 --- a/app/models/chorus_configuration.rb +++ b/app/models/chorus_configuration.rb @@ -2,9 +2,9 @@ class ChorusConfiguration include ActiveModel::Model include ActiveModel::Attributes - attribute :centre_de_coup, :json, default: '{}' - attribute :domaine_fonctionnel, :json, default: '{}' - attribute :referentiel_de_programmation, :json, default: '{}' + attribute :centre_de_coup, :simple_json, default: '{}' + attribute :domaine_fonctionnel, :simple_json, default: '{}' + attribute :referentiel_de_programmation, :simple_json, default: '{}' def format_displayed_value(attribute_name) case attribute_name diff --git a/app/services/api_bretagne_service.rb b/app/services/api_bretagne_service.rb index 1bdc0e56e..5f317ee59 100644 --- a/app/services/api_bretagne_service.rb +++ b/app/services/api_bretagne_service.rb @@ -50,7 +50,6 @@ class APIBretagneService end end - def call(url:, params:) API::Client.new.(url:, params:, authorization_token:, method:) end diff --git a/config/initializers/attribute_types.rb b/config/initializers/attribute_types.rb index a487d607d..153838f86 100644 --- a/config/initializers/attribute_types.rb +++ b/config/initializers/attribute_types.rb @@ -1,4 +1,4 @@ -class JsonType < ActiveModel::Type::Value +class SimpleJsonType < ActiveModel::Type::Value def cast(value) return nil if value.blank? return value if value.is_a?(Hash) @@ -8,4 +8,4 @@ class JsonType < ActiveModel::Type::Value end end -ActiveModel::Type.register(:json, JsonType) +ActiveModel::Type.register(:simple_json, SimpleJsonType)