Features
-
Support callable objects as scopes:
class PostPolicy < ApplicationPolicy relation_scope AuthorizedPosts end class AuthorizedPosts def self.call(policy, relation) user = policy.user user.admin? ? relation : relation.where(user: user) end end
Changes
-
Drop Ruby 2.6 support.
-
Prism is now used as a parser for debugging utils.