Class: Refinery::UsersController

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) create

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



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

def create
  @user = User.new(params[:user])

  if @user.create_first
    flash[:message] = "<h2>#{t('welcome', :scope => 'refinery.users.create', :who => @user.username).gsub(/\.$/, '')}.</h2>".html_safe

    (@user)
    redirect_back_or_default(refinery.admin_root_path)
  else
    render :new
  end
end

- (Object) new



10
11
12
# File 'authentication/app/controllers/refinery/users_controller.rb', line 10

def new
  @user = User.new
end