From 11884b685cdff102b1f8bcb544a6fac235cad08a Mon Sep 17 00:00:00 2001 From: taitus Date: Wed, 23 Dec 2020 10:22:14 +0100 Subject: [PATCH] Avoid conflict between SDG::Manager classes On production environments the application wasn't loading because the `SDG::Manager` class was defined in two places. We don't know the exact reasons for the conflict and why these changes fix it. --- app/models/abilities/sdg/manager.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/models/abilities/sdg/manager.rb b/app/models/abilities/sdg/manager.rb index 8d28e0f30..f3368fa87 100644 --- a/app/models/abilities/sdg/manager.rb +++ b/app/models/abilities/sdg/manager.rb @@ -1,12 +1,10 @@ -module Abilities - class SDG::Manager - include CanCan::Ability +class Abilities::SDG::Manager + include CanCan::Ability - def initialize(user) - merge Abilities::Common.new(user) + def initialize(user) + merge Abilities::Common.new(user) - can :read, ::SDG::Goal - can :read, ::SDG::Target - end + can :read, ::SDG::Goal + can :read, ::SDG::Target end end