diff --git a/Gemfile b/Gemfile index 8849da0e9..0286da028 100644 --- a/Gemfile +++ b/Gemfile @@ -26,7 +26,6 @@ gem 'delayed_job_web' gem 'devise' # Gestion des comptes utilisateurs gem 'devise-async' gem 'dotenv-rails', require: 'dotenv/rails-now' # dotenv should always be loaded before rails -gem 'flipflop' gem 'flipper' gem 'flipper-active_record' gem 'flipper-ui' diff --git a/Gemfile.lock b/Gemfile.lock index 9bf075646..6ee007053 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,8 +220,6 @@ GEM faraday (0.15.4) multipart-post (>= 1.2, < 3) ffi (1.9.25) - flipflop (2.4.0) - activesupport (>= 4.0) flipper (0.16.2) flipper-active_record (0.16.2) activerecord (>= 3.2, < 6) @@ -733,7 +731,6 @@ DEPENDENCIES devise-async dotenv-rails factory_bot - flipflop flipper flipper-active_record flipper-ui diff --git a/app/models/administrateur.rb b/app/models/administrateur.rb index 738281e29..ed29cc034 100644 --- a/app/models/administrateur.rb +++ b/app/models/administrateur.rb @@ -1,4 +1,6 @@ class Administrateur < ApplicationRecord + self.ignored_columns = ['features'] + include EmailSanitizableConcern include ActiveRecord::SecureToken diff --git a/app/models/instructeur.rb b/app/models/instructeur.rb index 08087b61e..d9fd18dc9 100644 --- a/app/models/instructeur.rb +++ b/app/models/instructeur.rb @@ -1,4 +1,5 @@ class Instructeur < ApplicationRecord + self.ignored_columns = ['features'] include EmailSanitizableConcern has_and_belongs_to_many :administrateurs diff --git a/app/services/administrateur_usage_statistics_service.rb b/app/services/administrateur_usage_statistics_service.rb index 44d5cba6a..d7351e859 100644 --- a/app/services/administrateur_usage_statistics_service.rb +++ b/app/services/administrateur_usage_statistics_service.rb @@ -31,7 +31,6 @@ class AdministrateurUsageStatisticsService ds_created_at: administrateur.created_at, ds_active: administrateur.active, ds_id: administrateur.id, - ds_features: administrateur.features.to_json, nb_services: nb_services_by_administrateur_id[administrateur.id], nb_instructeurs: nb_instructeurs_by_administrateur_id[administrateur.id], diff --git a/spec/services/administrateur_usage_statistics_service_spec.rb b/spec/services/administrateur_usage_statistics_service_spec.rb index 60eb299f0..3133e4a28 100644 --- a/spec/services/administrateur_usage_statistics_service_spec.rb +++ b/spec/services/administrateur_usage_statistics_service_spec.rb @@ -17,7 +17,6 @@ describe AdministrateurUsageStatisticsService do ds_created_at: Time.zone.now, ds_active: false, ds_id: administrateur.id, - ds_features: "{}", nb_services: 0, nb_instructeurs: 0, ds_nb_demarches_actives: 0, @@ -43,7 +42,6 @@ describe AdministrateurUsageStatisticsService do current_sign_in_at: Time.zone.local(2019, 3, 7), last_sign_in_at: Time.zone.local(2019, 2, 27), active: true, - features: { holy_hand_grenade_of_antioch: true }, services: [create(:service)], instructeurs: [create(:instructeur)]) end @@ -56,7 +54,6 @@ describe AdministrateurUsageStatisticsService do ds_created_at: Time.zone.now, ds_active: true, ds_id: administrateur.id, - ds_features: { holy_hand_grenade_of_antioch: true }.to_json, nb_services: 1, nb_instructeurs: 1 )