Created
June 23, 2017 12:29
-
-
Save garethrees/c6f51d58280b7c9e13707c075e0696c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| has_and_belongs_to_many :assemblies, -> { | |
| order(:name) | |
| } | |
| # ActiveRecord::StatementInvalid: SQLite3::SQLException: | |
| # no such column: assemblies.name: | |
| # SELECT "assemblies".* | |
| # FROM "assemblies" | |
| # INNER JOIN "assemblies_parts" | |
| # ON "assemblies"."id" = "assemblies_parts"."assembly_id" | |
| # WHERE "assemblies_parts"."part_id" = ? | |
| # ORDER BY "assemblies"."name" ASC | |
| # ^^ Note the ORDER BY value ^^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| has_and_belongs_to_many :assemblies, -> { | |
| order(:name) | |
| } | |
| # ActiveRecord::StatementInvalid: SQLite3::SQLException: | |
| # no such column: assembly_translations.name: | |
| # SELECT "assemblies".* | |
| # FROM "assemblies" | |
| # INNER JOIN "assemblies_parts" | |
| # ON "assemblies"."id" = "assemblies_parts"."assembly_id" | |
| # WHERE "assemblies_parts"."part_id" = ? | |
| # ORDER BY assembly_translations.name | |
| # ^^ Note the ORDER BY value ^^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment