Sha256: 4d23ea56f1c95906e7bd33bd7760f3e45fe381e4b56b667829acc1606043513a

Contents?: true

Size: 275 Bytes

Versions: 7

Compression:

Stored size: 275 Bytes

Contents

module Skydrive
  class Account < ActiveRecord::Base
    validates :key, presence: true, uniqueness: true
    validates :secret, presence: true

    has_many :users

    def self.new_key
      Account.create(key: SecureRandom.uuid, secret: SecureRandom.hex)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lti_skydrive-1.2.2 app/models/skydrive/account.rb
lti_skydrive-1.2.1 app/models/skydrive/account.rb
lti_skydrive-1.2.0 app/models/skydrive/account.rb
lti_skydrive-1.1.0 app/models/skydrive/account.rb
lti_skydrive-1.0.7 app/models/skydrive/account.rb
lti_skydrive-1.0.6 app/models/skydrive/account.rb
lti_skydrive-1.0.5 app/models/skydrive/account.rb