From 6fd69ca92e3090a2a8b7b73e7511bc1070290e22 Mon Sep 17 00:00:00 2001 From: Marc Florisson Date: Fri, 24 Aug 2012 11:46:09 +0200 Subject: create organisation --- app/controllers/application_controller.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ae953a25a..8cde89db0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,15 @@ class ApplicationController < ActionController::Base protect_from_forgery before_filter :authenticate_user! + + protected + + def current_organisation + current_user.organisation if current_user + end + helper_method :current_organisation + + def begin_of_association_chain + current_organisation + end end -- cgit v1.2.3