Sha256: c716ebd4ca720899a0e025aefeda6ca7aa844672c280d79d988c047df45fc684
Contents?: true
Size: 659 Bytes
Versions: 4
Compression:
Stored size: 659 Bytes
Contents
module Arcadex module Create #This is now called by the token when it's first saved def self.generate_auth_token token = ::Devise.friendly_token while ::Arcadex::Token.exists?(token) token = ::Devise.friendly_token end return token end #Arcadex.create_token(instance.tokens.new,exp_minutes,request) #Put any token in here to set it's values. Usually when its first created def self.set_token(token,exp_minutes,request) token.first_ip_address = request.remote_ip token.current_ip_address = request.remote_ip token.times_used = 0 token.expiration_minutes = exp_minutes token.save return token end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
arcadex-1.1.3 | lib/arcadex/create.rb |
arcadex-1.1.2 | lib/arcadex/create.rb |
arcadex-1.1.1 | lib/arcadex/create.rb |
arcadex-1.1.0 | lib/arcadex/create.rb |