1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
class UsersController < ApplicationController def new end def create @user = User.new(user_params) if @user.save sign_in @user #redirect_to @user else render 'new' end end def show @user = User.find(param[:id]) end end