Sha256: 9b671e164c3fe692f743df7db4a4acbaee48a6f0cc741948ba329ccc94fefef1
Contents?: true
Size: 594 Bytes
Versions: 61
Compression:
Stored size: 594 Bytes
Contents
# frozen_string_literal: true module Ibrain::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
61 entries across 61 versions & 1 rubygems