summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-03-02 20:06:40 -0500
committerDavisLWebb <davislwebb@ymail.com>2014-03-02 20:06:40 -0500
commite6b2993ad072d0cad2e52997c7957aae0a03415c (patch)
treebe7b89d7a81b934d4d5376abd17db9e769b3fd43 /app/controllers/users_controller.rb
parente5e485551fb757873f64cc35505426bec1b5da0d (diff)
I changed the user controller
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