action_policy icon indicating copy to clipboard operation
action_policy copied to clipboard

Unknown policy scope type :active_record_relation

Open tomasc opened this issue 2 years ago • 3 comments

Tell us about your environment

Ruby Version: 3.2

Framework Version (Rails, whatever): 7.0.4.1

Action Policy Version: 0.6.4

What did you do?

Upgraded from 0.6.3 to 0.6.4.

What actually happened?

Unknown policy scope type :active_record_relation. Downgrading back to 0.6.3 resolves this issue.

tomasc avatar Jan 24 '23 16:01 tomasc

Thanks for reporting.

Do you see this problem in development or other env? I think, it could be related to code reloading. Can you try disabling code reloading (config.cache_classes = true) and see if the issue persists?

palkan avatar Jan 31 '23 19:01 palkan

I pushed a fix to master, could you please check it out?

palkan avatar Mar 30 '23 21:03 palkan

@palkan thanks a lot for the fix! I have tested by sourcing action_policy from master and re-running test suite of my app, and the issue seems to be resolved.

tomasc avatar Mar 31 '23 08:03 tomasc