Sha256: 87bd5b5ff87cdbaac145a9eb231fdda0cc2396e96a9047470dd0b0029a53a1e6
Contents?: true
Size: 546 Bytes
Versions: 31
Compression:
Stored size: 546 Bytes
Contents
class RegistrationsController < ApplicationController skip_before_action :authenticate def create @<%= singular_table_name %> = <%= class_name %>.new(<%= "#{singular_table_name}_params" %>) if @<%= singular_table_name %>.save render json: @<%= singular_table_name %>, status: :created else render json: @<%= singular_table_name %>.errors, status: :unprocessable_entity end end private def <%= "#{singular_table_name}_params" %> params.permit(:email, :password, :password_confirmation) end end
Version data entries
31 entries across 31 versions & 1 rubygems