Class: Effective::ApplicantEndorsementsController

Inherits:
ApplicationController
  • Object
show all
Includes:
CrudController, Select2AjaxController
Defined in:
app/controllers/effective/applicant_endorsements_controller.rb

Instance Method Summary collapse

Instance Method Details

#select2_ajax_endorserObject

Must be signed in



25
26
27
28
29
30
31
32
# File 'app/controllers/effective/applicant_endorsements_controller.rb', line 25

def select2_ajax_endorser
  authenticate_user! if defined?(Devise)

  applicant = EffectiveMemberships.Applicant.find(params[:applicant_id])
  collection = Effective::ApplicantEndorsement.endorser_collection(applicant)

  respond_with_select2_ajax(collection)
end

#showObject



17
18
19
20
21
22
# File 'app/controllers/effective/applicant_endorsements_controller.rb', line 17

def show
  @applicant_endorsement = ApplicantEndorsement..find(params[:id])
  EffectiveResources.authorize!(self, :show, @applicant_endorsement)

  render 'edit'
end