Sha256: a29e9b644beda3d9eaf92773e7bb906f5a226562da058eee7bcf13bed9c861c3
Contents?: true
Size: 567 Bytes
Versions: 43
Compression:
Stored size: 567 Bytes
Contents
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 name] 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
43 entries across 43 versions & 1 rubygems