Sha256: 94d3720876eb018944b22a32e3c35f348a619be47aa675a497a76ab01de219b1
Contents?: true
Size: 593 Bytes
Versions: 63
Compression:
Stored size: 593 Bytes
Contents
# frozen_string_literal: true module Spree::RansackableAttributes extend ActiveSupport::Concern included do class_attribute :whitelisted_ransackable_associations class_attribute :whitelisted_ransackable_attributes class_attribute :default_ransackable_attributes self.default_ransackable_attributes = %w[id] end class_methods do def ransackable_associations(*_args) whitelisted_ransackable_associations || [] end def ransackable_attributes(*_args) default_ransackable_attributes | (whitelisted_ransackable_attributes || []) end end end
Version data entries
63 entries across 63 versions & 1 rubygems