Skip to content

Commit

Permalink
Raise error in controller method
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneZsng committed Nov 2, 2015
1 parent e0b4dff commit 84ee350
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 84ee350

Please sign in to comment.