diff --git a/spec/dummy/app/policies/article_policy.rb b/spec/dummy/app/policies/article_policy.rb index 31e39ac7..805731be 100644 --- a/spec/dummy/app/policies/article_policy.rb +++ b/spec/dummy/app/policies/article_policy.rb @@ -1,5 +1,11 @@ class ArticlePolicy - class Scope < Struct.new(:user, :scope) + class Scope + def initialize(user, scope, options: {}) + @user = user + @scope = scope + @options = options + end + def resolve raise NotImplementedError end diff --git a/spec/dummy/app/policies/comment_policy.rb b/spec/dummy/app/policies/comment_policy.rb index 6dab4a21..470bffe4 100644 --- a/spec/dummy/app/policies/comment_policy.rb +++ b/spec/dummy/app/policies/comment_policy.rb @@ -1,5 +1,11 @@ class CommentPolicy - class Scope < Struct.new(:user, :scope) + class Scope + def initialize(user, scope, options: {}) + @user = user + @scope = scope + @options = options + end + def resolve raise NotImplementedError end diff --git a/spec/dummy/app/policies/tag_policy.rb b/spec/dummy/app/policies/tag_policy.rb index b2260afb..146b8e22 100644 --- a/spec/dummy/app/policies/tag_policy.rb +++ b/spec/dummy/app/policies/tag_policy.rb @@ -1,5 +1,11 @@ class TagPolicy - class Scope < Struct.new(:user, :scope) + class Scope + def initialize(user, scope, options: {}) + @user = user + @scope = scope + @options = options + end + def resolve raise NotImplementedError end diff --git a/spec/dummy/app/policies/user_policy.rb b/spec/dummy/app/policies/user_policy.rb index acae72bb..13794055 100644 --- a/spec/dummy/app/policies/user_policy.rb +++ b/spec/dummy/app/policies/user_policy.rb @@ -1,5 +1,11 @@ class UserPolicy - class Scope < Struct.new(:user, :scope) + class Scope + def initialize(user, scope, options: {}) + @user = user + @scope = scope + @options = options + end + def resolve raise NotImplementedError end