diff options
| author | mo khan <mo@mokhan.ca> | 2014-08-12 22:31:43 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-08-12 22:31:43 -0600 |
| commit | 5307333c621d43b573453d2365a06fc06d3c75fc (patch) | |
| tree | e5fa18d7bd0280ba9417e27d1980ba9a05964896 /app/controllers/application_controller.rb | |
| parent | 91d13ed2441a95cc8dca9e889d662339bafa198a (diff) | |
make current_user public.
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e7a67ae0..12e48976 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,10 @@ class ApplicationController < ActionController::Base before_filter :load_header before_filter :configure_permitted_parameters, if: :devise_controller? + def current_user + @session.try(:user) + end + protected def configure_permitted_parameters @@ -25,7 +29,4 @@ class ApplicationController < ActionController::Base redirect_to new_session_path unless @session end - def current_user - @session.try(:user) - end end |
