FIX GD BATCH POLICY

This commit is contained in:
24c02 2025-10-14 12:34:49 -04:00
parent 0cd452ce9e
commit 53c66c2dee
3 changed files with 3 additions and 7 deletions

View file

@ -5,12 +5,6 @@ class BaseBatchesController < ApplicationController
REQUIRED_FIELDS = %w[first_name line_1 city state postal_code country].freeze
PREVIEW_ROWS = 3
# GET /batches or /batches.json
def index
authorize Batch
@batches = policy_scope(Batch).order(created_at: :desc)
end
# GET /batches/1 or /batches/1.json
def show
authorize @batch

View file

@ -28,7 +28,7 @@ module SnailMail
render_destination_address(
133,
170,
176,
256,
107,
size: 18, valign: :center, align: :left

View file

@ -43,6 +43,8 @@
# fk_rails_... (warehouse_template_id => warehouse_templates.id)
#
class Letter::Batch < Batch
def self.policy_class = Letter::BatchPolicy
self.inheritance_column = "type"
# default_scope { where(type: 'letters') }
has_many :letters, dependent: :destroy