Class: Passkit::Dashboard::PreviewsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Passkit::Dashboard::PreviewsController
- Defined in:
- app/controllers/passkit/dashboard/previews_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 |
# File 'app/controllers/passkit/dashboard/previews_controller.rb', line 4 def index end |
#show ⇒ Object
7 8 9 10 11 12 |
# File 'app/controllers/passkit/dashboard/previews_controller.rb', line 7 def show builder = Passkit.configuration.available_passes[params[:class_name]] path = Factory.create_pass(params[:class_name].constantize, builder.call) send_file path, type: "application/vnd.apple.pkpass", disposition: "attachment", filename: "pass.pkpass" end |