lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt in authentication-zero-1.0.2 vs lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt in authentication-zero-2.0.0
- old
+ new
@@ -1,12 +1,8 @@
class PasswordResetsController < ApplicationController
skip_before_action :authenticate
- before_action :set_<%= singular_table_name %>, only: %i[ edit update ]
-
- def edit
- render json: { error: "Open this link in your device" }, status: :not_found
- end
+ before_action :set_<%= singular_table_name %>, only: :update
def create
if @<%= singular_table_name %> = <%= class_name %>.find_by_email(params[:email])
PasswordMailer.with(<%= singular_table_name %>: @<%= singular_table_name %>).reset.deliver_later
else