Sha256: 974a325f8f59ea847e28af4512ecf69c307cb1bb9cca5c9db54e89e598835711
Contents?: true
Size: 598 Bytes
Versions: 34
Compression:
Stored size: 598 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 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
34 entries across 34 versions & 2 rubygems