Class: RequestLumberjack::LoggedResponse
- Inherits:
-
Object
- Object
- RequestLumberjack::LoggedResponse
- Includes:
- DataMapper::Resource
- Defined in:
- lib/request_lumberjack/logged_response.rb
Class Method Summary collapse
Class Method Details
.create_from_rails_response(response) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/request_lumberjack/logged_response.rb', line 13 def create_from_rails_response(response) logged_request = LoggedResponse.create( :request_uri => response.request.request_uri, :status => response.status, :request_method => response.request.request_method ) end |
.create_from_response(response) ⇒ Object
21 22 23 |
# File 'lib/request_lumberjack/logged_response.rb', line 21 def create_from_response(response) create_from_rails_response(response) if defined?(RAILS_ENV) end |