aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/chouette_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/chouette_controller.rb')
-rw-r--r--app/controllers/chouette_controller.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/chouette_controller.rb b/app/controllers/chouette_controller.rb
index 46691b13e..074fc0515 100644
--- a/app/controllers/chouette_controller.rb
+++ b/app/controllers/chouette_controller.rb
@@ -2,15 +2,18 @@ class ChouetteController < BreadcrumbController
include ApplicationHelper
include BreadcrumbHelper
-
+
before_action :switch_referential
-
+
def switch_referential
Apartment::Tenant.switch!(referential.slug)
- end
+ end
def referential
- @referential ||= current_organisation.referentials.find params[:referential_id]
- end
+ @referential ||= current_organisation.referentials.find params[:referential_id]
+ end
+ alias_method :current_referential, :referential
+ helper_method :current_referential
+
end