Sha256: ba535b8fced58615beae7e02db153b279290d2da73e93d29fb3cafea1651fea2
Contents?: true
Size: 566 Bytes
Versions: 42
Compression:
Stored size: 566 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] def self.ransackable_associations(*args) self.whitelisted_ransackable_associations || [] end def self.ransackable_attributes(*args) self.default_ransackable_attributes | (self.whitelisted_ransackable_attributes || []) end end end
Version data entries
42 entries across 42 versions & 2 rubygems
Version | Path |
---|---|
spree_core-2.3.13 | app/models/concerns/spree/ransackable_attributes.rb |
solidus_core-1.0.1 | app/models/concerns/spree/ransackable_attributes.rb |