Class: FormsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- FormsController
- Defined in:
- app/controllers/forms_controller.rb
Instance Method Summary collapse
Instance Method Details
#answer ⇒ Object
30 |
# File 'app/controllers/forms_controller.rb', line 30 def answer; end |
#deliver ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/controllers/forms_controller.rb', line 21 def deliver respond_to do |format| format.html do ActiveadminSelleoCms::FormMailer.form_submission(@form, params[:form_uuid]).deliver flash[:notice] = "Your form has been sent. Thank you." end end end |
#download ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/forms_controller.rb', line 8 def download ActiveadminSelleoCms::FormAnswer.where(form_uuid: params[:form_uuid]) respond_to do |format| format.pdf do render :pdf => @form.title.parameterize, :show_as_html => false end format.html do render :pdf => @form.title.parameterize, :show_as_html => true end end end |