Skip to content

Instantly share code, notes, and snippets.

@wykhuh
Last active June 30, 2018 01:18
Show Gist options
  • Save wykhuh/037a5ae92db794ce52ecf6da9fe223e2 to your computer and use it in GitHub Desktop.
Save wykhuh/037a5ae92db794ce52ecf6da9fe223e2 to your computer and use it in GitHub Desktop.

fine prior to 5.1

class A < ApplicationRecord

has_many :foo, through: :boo
has_many :boo

ActiveRecord::HasManyThroughOrderError for 5.1 and up rails/rails#29123

class A < ApplicationRecord

has_many :foo, through: :boo
has_many :boo

correct for 5.1+

class A < ApplicationRecord

has_many :boo
has_many :foo, through: :boo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment