Sha256: 012356b740cb077da12a9bc746eafca71252e323b02073f2e38ab2000021bc5d

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

module Doorkeeper
  class AccessToken < ActiveRecord::Base
    include AccessTokenMixin

    self.table_name = "#{table_name_prefix}oauth_access_tokens#{table_name_suffix}".to_sym

    def self.delete_all_for(application_id, resource_owner)
      where(application_id: application_id,
            resource_owner_id: resource_owner.id).delete_all
    end
    private_class_method :delete_all_for

    def self.order_method
      :order
    end
    def self.created_at_desc
      'created_at desc'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
doorkeeper-2.0.0.rc2 lib/doorkeeper/orm/active_record/access_token.rb
doorkeeper-2.0.0.alpha1 lib/doorkeeper/orm/active_record/access_token.rb