Sha256: ca27ed3cd1372961be72dfbc8299d2e24973ca2f3a8a9006f013d8f659339977
Contents?: true
Size: 755 Bytes
Versions: 6
Compression:
Stored size: 755 Bytes
Contents
class FormsController < ApplicationController respond_to :html, :pdf before_filter do @form = ActiveadminSelleoCms::Form.find(params[:id]) end 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 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 def answer; end end
Version data entries
6 entries across 6 versions & 1 rubygems