Sha256: 5cf6bee76f145f485c39b90e14b420ded3618ef99b6f759d5e5c498d521eb79f

Contents?: true

Size: 923 Bytes

Versions: 115

Compression:

Stored size: 923 Bytes

Contents

class Platform::AccessToken < BulletTrain::Api.base_class.constantize
  self.table_name = "oauth_access_tokens"

  include Doorkeeper::Orm::ActiveRecord::Mixins::AccessToken
  # 🚅 add concerns above.

  # 🚅 add concerns above.

  # 🚅 add attribute accessors above.

  # 🚅 add belongs_to associations above.

  # 🚅 add has_many associations above.

  has_one :team, through: :application
  # 🚅 add has_one associations above.

  # 🚅 add scopes above.

  validates :token, presence: true
  validates :description, presence: true, if: :provisioned?
  # 🚅 add validations above.

  # 🚅 add callbacks above.

  # 🚅 add delegations above.

  def label_string
    description
  end

  def system_level?
    return false unless application
    !application.team_id
  end

  def description
    if system_level?
      application.name
    else
      super
    end
  end
  # 🚅 add methods above.
end

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
bullet_train-api-1.6.32 app/models/platform/access_token.rb
bullet_train-api-1.6.31 app/models/platform/access_token.rb
bullet_train-api-1.6.30 app/models/platform/access_token.rb
bullet_train-api-1.6.29 app/models/platform/access_token.rb
bullet_train-api-1.6.28 app/models/platform/access_token.rb
bullet_train-api-1.6.27 app/models/platform/access_token.rb
bullet_train-api-1.6.26 app/models/platform/access_token.rb
bullet_train-api-1.6.25 app/models/platform/access_token.rb
bullet_train-api-1.6.24 app/models/platform/access_token.rb
bullet_train-api-1.6.23 app/models/platform/access_token.rb
bullet_train-api-1.6.22 app/models/platform/access_token.rb
bullet_train-api-1.6.21 app/models/platform/access_token.rb
bullet_train-api-1.6.20 app/models/platform/access_token.rb
bullet_train-api-1.6.19 app/models/platform/access_token.rb
bullet_train-api-1.6.18 app/models/platform/access_token.rb
bullet_train-api-1.6.17 app/models/platform/access_token.rb
bullet_train-api-1.6.16 app/models/platform/access_token.rb
bullet_train-api-1.6.15 app/models/platform/access_token.rb
bullet_train-api-1.6.14 app/models/platform/access_token.rb
bullet_train-api-1.6.13 app/models/platform/access_token.rb