Skip to content

Commit

Permalink
Merge pull request lynndylanhurley#430 from LIQIDTechnology/master
Browse files Browse the repository at this point in the history
Raise error in controller method
  • Loading branch information
booleanbetrayal committed Nov 28, 2015
2 parents df960d9 + 84ee350 commit 9668dc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/devise_token_auth/passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def edit
config: params[:config]
}))
else
raise ActionController::RoutingError.new('Not Found')
render_edit_error
end
end

Expand Down Expand Up @@ -179,6 +179,10 @@ def render_create_error
}, status: @error_status
end

def render_edit_error
raise ActionController::RoutingError.new('Not Found')
end

def render_update_error_unauthorized
render json: {
success: false,
Expand Down

0 comments on commit 9668dc7

Please sign in to comment.