]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Update ActiveRecord queries to use arel
[rails.git] / app / controllers / application_controller.rb
index 904388b9d8959193267c2ff08adc49083f6dd663..5018dcc42b3c00201613608050da92f4c3c7173b 100644 (file)
@@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
 
   def authorize_web
     if session[:user]
-      @user = User.find(session[:user], :conditions => {:status => ["active", "confirmed", "suspended"]})
+      @user = User.where(:status => ["active", "confirmed", "suspended"]).find(session[:user])
 
       if @user.status == "suspended"
         session.delete(:user)