Sha256: d9f58ca6303dc053543fa68ca112314d8431620f7f38f8513096afe7f330a768
Contents?: true
Size: 713 Bytes
Versions: 4
Compression:
Stored size: 713 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?(:auth_token => 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,max_uses) token.first_ip_address = request.remote_ip token.current_ip_address = request.remote_ip token.times_used = 0 token.expiration_minutes = exp_minutes token.max_uses = max_uses token.save return token end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
arcadex-1.3.1 | lib/arcadex/create.rb |
arcadex-1.3.0 | lib/arcadex/create.rb |
arcadex-1.2.3 | lib/arcadex/create.rb |
arcadex-1.2.1 | lib/arcadex/create.rb |