Skip to content

Instantly share code, notes, and snippets.

@promisepreston
Last active September 4, 2019 14:10
Show Gist options
  • Save promisepreston/32f9fdd57b14c956a3f9b42d253cc26d to your computer and use it in GitHub Desktop.
Save promisepreston/32f9fdd57b14c956a3f9b42d253cc26d to your computer and use it in GitHub Desktop.
Multi-tenant application for universities
<code data-gist-id="ec8cc541c45705a34988c68225627ecb" data-gist-hide-line-numbers="true"></code>
class UsersController < ApplicationController
def show
@user = User.find(params[:id])
end
def new
@user = User.new
end
def create
@user = user.new(user_params)
if @user.save
#
else
render 'new'
end
end
private
def user_params
params.require(:user).permit(:name, :email, :password, :password_confirmation)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment