Open emilkarl opened 7 years ago
@emilkarl that's a good question. can you provide a failing case with this or at least the model relevant info?
have this in 3 models with association using class_name
happens for has_many
and belongs_to
(not limited just seeing this for those two in my codebase)
class Corge < ActiveRecord::Base
has_many :foo_bars, class_name: Bar::Foo.name
belongs_to :baz, class_name: Qux::Quux.name
end
results in:
add_index :corges, [:corge_id, :bar/foo_id]
add_index :corges, [:corge_id, :qux/quux_id]
@emilkarl @jethroo @SirRawlins @dandrews @olivierbuffon @matthewford which exact version of rails 4 are you using? I'm trying to reproduce it without success.
PS: if someone want to try to create a test case, it will be super helpfull.
@plentz
the same result
add_index :spree_shipments, [:spree/adjustment_id, :spree/order_id]
I will make a PR for that.
Close this?
Close this?
Is there a PR for this, still needing this fix
Tried this with an app that uses acts-as-taggable-on. A reccomended index looks like this but this fails with Rails 4. Any idea how to solve or should the index not be there?
add_index :taggings, [:acts_as_taggable_on/tag_id, :user_id]