Class: Maquina::FirstRunsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/maquina/first_runs_controller.rb

Instance Method Summary collapse

Methods included from Authenticate

#after_authentication_url, #authenticated?, #current_user, #require_authentication

Instance Method Details

#createObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/maquina/first_runs_controller.rb', line 13

def create
  @user = create_user

  if @user.persisted?
    start_new_session_for(@user)

    redirect_to maquina.root_path, notice: t("flash.first_runs.create.notice")
  else
    flash.now.alert = t("flash.first_runs.create.alert")
    render :show, status: :unprocessable_entity
  end
end

#showObject



9
10
11
# File 'app/controllers/maquina/first_runs_controller.rb', line 9

def show
  @user = Maquina::User.new
end