Sha256: 3c76e2b42a0d3644fd193a6d15f0bd9a55a3a9ef340accf38023f51026e28854
Contents?: true
Size: 485 Bytes
Versions: 24
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true # Add explicit #policy_cache_key to Relation to # avoid calling #cache_key. # See https://github.com/palkan/action_policy/issues/55 ActiveRecord::Relation.include(Module.new do def policy_cache_key object_id end # Explicitly define the policy_class method to avoid # making Relation immutable (by initializing `arel` in `#respond_to_missing?). # See https://github.com/palkan/action_policy/issues/101 def policy_class nil end end)
Version data entries
24 entries across 24 versions & 1 rubygems