summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 74ab72c..2abc93e 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,13 +1,14 @@
class UsersController < ApplicationController
def new
+ @user = User.new
end
def create
@user = User.new(user_params)
if @user.save
sign_in @user
- #redirect_to @user
+ #redirect_to root_path
else
render 'new'
end
@@ -16,4 +17,10 @@ class UsersController < ApplicationController
def show
@user = User.find(param[:id])
end
+
+ private
+
+ def user_params
+ params.require(:user).permit(:name, :email, :user_name, :password, :password_confirmation)
+ end
end