class RegistrationsController < ApplicationController skip_before_action :authenticate def new @<%= singular_table_name %> = <%= class_name %>.new end def create @<%= singular_table_name %> = <%= class_name %>.new(<%= "#{singular_table_name}_params" %>) if @<%= singular_table_name %>.save redirect_to sign_in_path, notice: "Welcome! You have signed up successfully" else render :new, status: :unprocessable_entity end end private def <%= "#{singular_table_name}_params" %> params.require(:<%= singular_table_name %>).permit(:email, :password, :password_confirmation) end end