Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RegistrationsController example using form object
class RegistrationsController < Devise::RegistrationsController
def create
form = UserRegistrationForm.new(params)
if form.save
# ...
else
render json: form.user.errors, status: :unprocessable_entity
end
end
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.