Module: WhatThe::BackboneHelper
- Defined in:
- lib/what_the/backbone_helper.rb
Instance Method Summary collapse
- #response_json ⇒ Object
- #response_json_error ⇒ Object
- #response_json_redirect ⇒ Object
- #response_json_success ⇒ Object
Instance Method Details
#response_json ⇒ Object
3 4 5 |
# File 'lib/what_the/backbone_helper.rb', line 3 def response_json JSON.parse(response.body).with_indifferent_access end |
#response_json_error ⇒ Object
15 16 17 |
# File 'lib/what_the/backbone_helper.rb', line 15 def response_json_error response_json[:importance] == "error" end |
#response_json_redirect ⇒ Object
7 8 9 |
# File 'lib/what_the/backbone_helper.rb', line 7 def response_json_redirect response_json[:redirect] end |
#response_json_success ⇒ Object
11 12 13 |
# File 'lib/what_the/backbone_helper.rb', line 11 def response_json_success response_json[:importance] == "success" end |