Class: Refinery::Authentication::Devise::UsersController

Inherits:
Devise::RegistrationsController
  • Object
show all
Defined in:
app/controllers/refinery/authentication/devise/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

This method should only be used to create the first Refinery user.


17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/refinery/authentication/devise/users_controller.rb', line 17

def create
  @user = User.new(user_params)

  if @user.create_first
    flash[:message] = t('welcome', scope: 'refinery.authentication.devise.users.create', who: @user)

    (@user)
    redirect_back_or_default(Refinery::Core.backend_path)
  else
    render :new
  end
end

#newObject


12
13
14
# File 'app/controllers/refinery/authentication/devise/users_controller.rb', line 12

def new
  @user = User.new
end