Sha256: f9f9087b2c6c42720bf5c2b870dd25df456b732e7c4934b896c8f6b08dabcbe7
Contents?: true
Size: 629 Bytes
Versions: 17
Compression:
Stored size: 629 Bytes
Contents
class RegistrationsController < ApplicationController skip_before_action :authenticate, only: :create 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 def destroy Current.<%= singular_table_name %>.destroy end private def <%= "#{singular_table_name}_params" %> params.permit(:email, :password, :password_confirmation) end end
Version data entries
17 entries across 17 versions & 1 rubygems