saucy/app/controllers/letters_controller.rb

15 lines
301 B
Ruby

class LettersController < ApplicationController
before_action :require_login
include MemberFilter
# POST /letters
def create
members = filtered_members
pdf = Letters.generate(params[:template], members)
send_data pdf, filename: "members.pdf", type: "application/pdf"
end
end