]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Use a current_user helper for accessing the logged in user in all views.
[rails.git] / app / controllers / application_controller.rb
index a809139cec656e2f0142790b3e7b3a1c862c5404..049f6e02ea79207556505e5e104105ecc3809104 100644 (file)
@@ -5,6 +5,8 @@ class ApplicationController < ActionController::Base
 
   before_action :fetch_body
 
+  helper_method :current_user
+
   def authorize_web
     if session[:user]
       self.current_user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first