Module: WhatThe::BackboneHelper

Defined in:
lib/what_the/backbone_helper.rb

Instance Method Summary collapse

Instance Method Details

#response_jsonObject



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_errorObject



15
16
17
# File 'lib/what_the/backbone_helper.rb', line 15

def response_json_error
  response_json[:importance] == "error"
end

#response_json_redirectObject



7
8
9
# File 'lib/what_the/backbone_helper.rb', line 7

def response_json_redirect
  response_json[:redirect]
end

#response_json_successObject



11
12
13
# File 'lib/what_the/backbone_helper.rb', line 11

def response_json_success
  response_json[:importance] == "success"
end