Class: UserRequest

Inherits:
SecureRequest show all
Defined in:
lib/app/models/user_request.rb

Overview

Capture the request for a user

Direct Known Subclasses

UserLoginRequest

Instance Method Summary collapse

Methods inherited from SecureRequest

#consume!, #expired?, #good?, #not_expired?, #status

Instance Method Details

#consume(options = {}) ⇒ Object

This method is abstract.

Mark this request as consumed recording the user and request information if given



13
14
15
16
# File 'lib/app/models/user_request.rb', line 13

def consume(options = {})
  self.user = options[:user] if options[:user].present?
  super
end

#default_uri(endpoint_path = 'home') ⇒ Object

This method is abstract.

Return the end point for the given request



19
20
21
# File 'lib/app/models/user_request.rb', line 19

def default_uri(endpoint_path = 'home')
  [SystemConfiguration.base_url, endpoint_path].join('/')
end