diff options
author | Tomer Kimia <tkimia@purdue.edu> | 2014-03-02 18:04:56 -0500 |
---|---|---|
committer | Tomer Kimia <tkimia@purdue.edu> | 2014-03-02 18:04:56 -0500 |
commit | 5c863b2d55d41d836c906b55951cdc8658e959ed (patch) | |
tree | f1ab13415da88d09883483c6ab338b0a664ee9dd /app/controllers | |
parent | 9438f751c264c61088aabc6368e0aa7cee4d9aef (diff) | |
parent | 2426a2b1e5b6811f47f0a05dd66a001fdd117450 (diff) |
"dont worry this merge is meaningless"
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/users_controller.rb | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 83a2278..7487f87 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,6 +4,5 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception #include sessionhelper for the session controller and view - #include SessionHelper - + include SessionsHelper end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f4e1499..74ab72c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3,6 +3,16 @@ 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 |