Class: Maromi::Request

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource, Helpers::SmartAuthorizerMarshal
Defined in:
lib/maromi/models/request.rb

Instance Method Summary collapse

Methods included from Helpers::SmartAuthorizerMarshal

#authorizer, #authorizer=

Instance Method Details

#upgrade!Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/maromi/models/request.rb', line 18

def upgrade!
  authorization = Authorization.create(:token => Helpers::Token.new(16),
                                       :secret => Helpers::Token.new,
                                       :authorizer => authorizer,
                                       :scopes => scopes, 
                                       :consumer => consumer)
  destroy!
  return authorization
rescue Exception => e
  p e
  p e.message
  p e.backtrace
end