]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/oauth_token.rb
Eliminate loading flash for welcome overlay
[rails.git] / app / models / oauth_token.rb
index f9255e56c32c2321ae90b077677f15d28e3a061c..0fe0bea301eebfdc5c4da325c28ec9f214ecc463 100644 (file)
@@ -2,7 +2,7 @@ class OauthToken < ActiveRecord::Base
   belongs_to :client_application
   belongs_to :user
 
-  scope :authorized, where("authorized_at IS NOT NULL and invalidated_at IS NULL")
+  scope :authorized, -> { where("authorized_at IS NOT NULL and invalidated_at IS NULL") }
 
   validates_uniqueness_of :token
   validates_presence_of :client_application, :token