]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Use hashes to define where..in sql queries
[rails.git] / app / controllers / application_controller.rb
index d22a031d4bcbbc5707b5cf6e85f687ea7d490204..5dcfee07ca03cc9aaeb84549513305af4c658133 100644 (file)
@@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
 
   def authorize_web
     if session[:user]
-      self.current_user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first
+      self.current_user = User.where(:id => session[:user], :status => %w[active confirmed suspended]).first
 
       if session[:fingerprint] &&
          session[:fingerprint] != current_user.fingerprint