Class: LotusAdmin::UsersController

Inherits:
ResourceController show all
Defined in:
app/controllers/lotus_admin/users_controller.rb

Instance Method Summary collapse

Methods inherited from ResourceController

#destroy, #edit, #index, manages, #new, #show, #update

Methods included from FileStreamer

#index

Instance Method Details

#createObject



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

def create
  super do |format|
    resource.password = Devise.friendly_token.first(8)

    if resource.save
      resource.send_invited_email_notification

      redirect_to after_create_redirect, notice: "Created new #{ resource_class.model_name.human }"
    else
      render :new
    end
  end
end