Class: Mori::RegistrationsController

Inherits:
MoriController
  • Object
show all
Defined in:
app/controllers/mori/registrations_controller.rb

Instance Method Summary collapse

Methods inherited from MoriController

#current_user, #warden

Instance Method Details

#createObject



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

def create
  @user = Mori::User.new(user_params)
  if @user.save
    warden.set_user(@user)
    redirect_to Mori.configuration.
  else
    render "new"
  end
end

#newObject



2
3
4
5
6
7
# File 'app/controllers/mori/registrations_controller.rb', line 2

def new
  if current_user
    redirect_to Mori.configuration.
  end
  @user = Mori::User.new
end