Exception: BabySqueel::AssociationAliasingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/baby_squeel/errors.rb

Overview

:nodoc:

Constant Summary collapse

MESSAGE =
"Attempted to alias '%{association}' as '%{alias_name}', but the " \
"association was implicitly joined. Either join the association " \
"with `on` or remove the alias. For example:" \
"\n\n  Post.joining { author }" \
"\n  Post.joining { author.on(author_id == author.id) }\n\n"

Instance Method Summary collapse

Constructor Details

#initialize(association, alias_name) ⇒ AssociationAliasingError

Returns a new instance of AssociationAliasingError.



33
34
35
# File 'lib/baby_squeel/errors.rb', line 33

def initialize(association, alias_name)
  super format(MESSAGE, association: association, alias_name: alias_name)
end