Skip to content

Commit

Permalink
update registrations#create
Browse files Browse the repository at this point in the history
[fix] root_path to root_url
  • Loading branch information
kenohata committed Nov 23, 2014
1 parent c71c645 commit 34505a9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/controllers/registrations_controller.rb
Expand Up @@ -2,4 +2,20 @@ class RegistrationsController < ApplicationController
def new
@user = User.new
end

def create
@user = User.new(params_user)

if @user.save
redirect_to root_url
else
render :new
end
end

private

def params_user
params.require(:user).permit(:name, :email, :password, :password_confirmation)
end
end

0 comments on commit 34505a9

Please sign in to comment.