Sha256: 4cdde9143089b28927fc0669096114519ef57ebf3973141ef7601f6c1be0ea77

Contents?: true

Size: 391 Bytes

Versions: 10

Compression:

Stored size: 391 Bytes

Contents

class RegistrationsController < ApplicationController
  skip_before_action :authenticate

  def create
    @user = User.new(user_params)

    if @user.save
      render json: @user, status: :created
    else
      render json: @user.errors, status: :unprocessable_entity
    end
  end

  private
    def user_params
      params.permit(:email, :password, :password_confirmation)
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
authentication-zero-2.15.2 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.15.1 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.15.0 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.14.0 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.13.0 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.12.6 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.12.5 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.12.4 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.12.3 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt
authentication-zero-2.12.0 lib/generators/authentication/templates/controllers/api/registrations_controller.rb.tt