Exception: ROM::SQL::Plugin::Associates::MissingJoinKeysError Private
- Inherits:
-
StandardError
- Object
- StandardError
- ROM::SQL::Plugin::Associates::MissingJoinKeysError
- Defined in:
- lib/rom/sql/plugin/associates.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- ERROR_TEMPLATE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
':%{command} command for :%{relation} relation ' \ 'is missing join keys configuration for :%{name} association'
Instance Method Summary collapse
-
#initialize(command, assoc_name) ⇒ MissingJoinKeysError
constructor
private
A new instance of MissingJoinKeysError.
- #tokens(command, assoc_name) ⇒ Object private
Constructor Details
#initialize(command, assoc_name) ⇒ MissingJoinKeysError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MissingJoinKeysError.
12 13 14 |
# File 'lib/rom/sql/plugin/associates.rb', line 12 def initialize(command, assoc_name) super(ERROR_TEMPLATE % tokens(command, assoc_name)) end |
Instance Method Details
#tokens(command, assoc_name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 19 20 |
# File 'lib/rom/sql/plugin/associates.rb', line 16 def tokens(command, assoc_name) { command: command.register_as, relation: command.relation, name: assoc_name } end |