cartodb/app/models/carto/client_application.rb

12 lines
297 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
require 'active_record'
module Carto
class ClientApplication < ActiveRecord::Base
belongs_to :user, class_name: Carto::User
has_many :oauth_tokens, class_name: Carto::OauthToken
has_many :access_tokens, -> { where(type: ['AccessToken']) }, class_name: Carto::OauthToken
end
end