Last active
September 4, 2019 14:10
-
-
Save promisepreston/32f9fdd57b14c956a3f9b42d253cc26d to your computer and use it in GitHub Desktop.
Multi-tenant application for universities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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