diff options
| author | Marc Florisson | 2012-08-24 11:46:09 +0200 | 
|---|---|---|
| committer | Marc Florisson | 2012-08-24 11:46:09 +0200 | 
| commit | 6fd69ca92e3090a2a8b7b73e7511bc1070290e22 (patch) | |
| tree | 8f25b31f44fe9b239b25d232f8aee8844c7d0688 /app/controllers/application_controller.rb | |
| parent | 1fd4e99d38e25ba4e70324a2f06aa532ee0e7862 (diff) | |
| download | chouette-core-6fd69ca92e3090a2a8b7b73e7511bc1070290e22.tar.bz2 | |
create organisation
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 11 | 
1 files changed, 11 insertions, 0 deletions
| 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 | 
