Class: Backend::InvitationsController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/invitations_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

accounts_range_crit, crit_params, journal_entries_states_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name

Instance Method Details

#createObject


40
41
42
43
44
45
46
47
48
# File 'app/controllers/backend/invitations_controller.rb', line 40

def create
  @invitation = User.invite!(invite_params, current_user)

  if @invitation.errors.empty?
    redirect_to backend_invitations_path
  else
    render :new
  end
end

#indexObject


32
33
# File 'app/controllers/backend/invitations_controller.rb', line 32

def index
end

#newObject


35
36
37
38
# File 'app/controllers/backend/invitations_controller.rb', line 35

def new
  @invitation = User.new
  @form_url = backend_invitations_path
end