class Authz::Scopables::Base::MisconfiguredAssociation
Error that will be raised if the association of a model being scoped does not return the expected type of objects @api public
Attributes
association_method[R]
scopable[R]
scoped_class[R]
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/authz/scopables/base.rb, line 111 def initialize(options = {}) @scoped_class = options.fetch(:scoped_class) @scopable = options.fetch :scopable @association_method = options.fetch :association_method message = "#{scoped_class} has a misconfigured association " \ "for #{scopable}. " \ "Make sure that ##{association_method} " \ 'returns either an instance of class' \ "#{scopable.scoping_class_name} " \ 'or a collection that responds to #pluck(:id).' super(message) end