Class: UsersController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
13
14
15
16
# File 'app/controllers/users_controller.rb', line 9

def create
  debugger
  @user = User.create!(params[:user])
  respond_with(@user, :location => root_url, :notice => "Signed up!")
rescue VALIDATION_FAILED => e
  @user = e.document
  respond_with(@user, :location => new_user_path)
end

#newObject



5
6
7
# File 'app/controllers/users_controller.rb', line 5

def new
  @user = User.new
end