Sha256: 4c70d06fd9a4b47df4430ccee011bbe3373f41f258ef1ded71bc4add6343b5a3

Contents?: true

Size: 237 Bytes

Versions: 3

Compression:

Stored size: 237 Bytes

Contents

module Dune::Api::UserConcern
  extend ActiveSupport::Concern

  included do
    has_many :access_tokens, class_name: 'Dune::Api::AccessToken'
  end

  def get_access_token
    (access_tokens.last || access_tokens.create).code
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dune-api-1.1.0 app/models/dune/api/user_concern.rb
dune-api-1.0.2 app/models/dune/api/user_concern.rb
dune-api-1.0.1 app/models/dune/api/user_concern.rb