mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 16:38:18 +00:00
FIX GD BATCH POLICY
This commit is contained in:
parent
0cd452ce9e
commit
53c66c2dee
3 changed files with 3 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ module SnailMail
|
|||
|
||||
render_destination_address(
|
||||
133,
|
||||
170,
|
||||
176,
|
||||
256,
|
||||
107,
|
||||
size: 18, valign: :center, align: :left
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue