Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrevost committed Mar 1, 2016
1 parent a1768bf commit ca60d85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/callbacks_controller.rb
Expand Up @@ -17,7 +17,7 @@ def status

def extract_and_update_status_and_handle(params)
json = JSON.parse(params[:body])
logger.debug("JSON Status: #{json['status']}")
puts "JSON Status: #{json['status']}"
raise ActionController::RoutingError, 'Invalid Status' unless json['status']
@submission.status = json['status'] if valid_status?(json['status'])
extract_and_update_handle(json) if @submission.status == 'approved'
Expand All @@ -35,7 +35,7 @@ def extract_and_update_handle(json)

# move this to the model?
def valid_status?(status)
logger.debug("status attempted: #{status}")
puts "status attempted: #{status}"
%w(approved rejected).include?(status)
end
end

0 comments on commit ca60d85

Please sign in to comment.