lib/doorkeeper/models/mongoid3_4/application.rb in doorkeeper-1.1.0 vs lib/doorkeeper/models/mongoid3_4/application.rb in doorkeeper-1.2.0

- old
+ new

@@ -3,20 +3,20 @@ include Mongoid::Document include Mongoid::Timestamps self.store_in collection: :oauth_applications - field :name, :type => String - field :uid, :type => String - field :secret, :type => String - field :redirect_uri, :type => String + field :name, type: String + field :uid, type: String + field :secret, type: String + field :redirect_uri, type: String index({ uid: 1 }, { unique: true }) - has_many :authorized_tokens, :class_name => "Doorkeeper::AccessToken" + has_many :authorized_tokens, class_name: 'Doorkeeper::AccessToken' def self.authorized_for(resource_owner) - ids = AccessToken.where(:resource_owner_id => resource_owner.id, :revoked_at => nil).map(&:application_id) + ids = AccessToken.where(resource_owner_id: resource_owner.id, revoked_at: nil).map(&:application_id) find(ids) end end end