Closed shaam48 closed 3 months ago
Hi @shaam48, I don't quite understand your question, but the default order is database dependent and usually depends on insertion order unless you define an explicit ordering.
You might want to check your approach to polymorphic association because that doesn't look correct to me.
For some reason it is ordering it based on :updated_at attribute.
Ignore the polymorphic association made a mistake there.
Are you actually calling Model1.ordered? Also, ordered might be a reserved word, try another scope name :)
Closing due to inactivity.
Model1.rb
Model2.rb
Is it defaulting to ordering by :updated_at attribute?