class Authz::Scopables::Base::AmbiguousAssociationName
Error that will be raised if the model being scoped has ambiguous association names for the included scopable (e.g. has both :city and :cities associations and ScopableByCity is Being included) @api public
Attributes
association_names[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 76 def initialize(options = {}) @scoped_class = options.fetch(:scoped_class) @scopable = options.fetch :scopable @association_names = options.fetch :association_names message = "#{scoped_class} has ambiguous association names " \ "#{association_names} for #{scopable}. " \ 'Use the ' \ "set_scopable_by_#{scopable.scoping_class_name.underscore}_association_name " \ 'method to define it manually.' super(message) end