Class: Effective::MembershipCardsController

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

Instance Method Summary collapse

Instance Method Details

#showObject



9
10
11
12
13
14
15
16
# File 'app/controllers/effective/membership_cards_controller.rb', line 9

def show
  membership = Effective::Membership.find(params[:id])
  card = resource_scope.new(membership: membership)

  EffectiveResources.authorize!(self, :show, card)

  send_data(card.to_pdf, filename: card.filename, type: card.content_type, disposition: 'attachment')
end