saucy/app/controllers/letters_controller.rb

15 lines
301 B
Ruby
Raw Normal View History

2022-07-16 10:27:43 +00:00
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