Skip to content

0.7.0

Latest
Compare
Choose a tag to compare
@palkan palkan released this 20 Jun 23:17
· 15 commits to master since this release

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.