Class: Locomotive::PublicSubmissionAccountsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/public_submission_accounts_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject


8
9
10
11
# File 'app/controllers/locomotive/public_submission_accounts_controller.rb', line 8

def edit
  authorize @content_type
  respond_with @content_type
end

#new_accountObject


19
20
21
22
23
24
25
# File 'app/controllers/locomotive/public_submission_accounts_controller.rb', line 19

def 
  if params[:public_submission_account].present?
    render partial: 'account', locals: { public_submission_account: params[:public_submission_account] }
  else
    head :unprocessable_entity
  end
end

#updateObject


13
14
15
16
17
# File 'app/controllers/locomotive/public_submission_accounts_controller.rb', line 13

def update
  authorize @content_type
  service.update(@content_type, content_type_params)
  respond_with @content_type, location: content_entries_path(current_site, @content_type.slug)
end