1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Gannon McGibbon
5ec2f35f27 Ensure custom PK types are casted in through reflection queries
Make sure primary keys with non-integer types can be correctly type
casted in through reflections.
2019-08-07 16:27:33 -04:00
Ryuta Kamizono
7c3da6e003 Add regression test for has_many through record creation
#33729 affected the behavior of the has_many through record creation.

Since #33729, the intermediate reflection of simple has_many through
association has `inverse_of` to the association, it causes extra through
record creation, the extra through record required valid before the
association record is saved.

2312537867/activerecord/lib/active_record/associations/has_many_through_association.rb (L95-L102)

I think that #33729 need to more work to care about has_many through
association, that PR should be reverted to not break existing apps.
2019-02-01 01:34:32 +09:00
Kir Shatrov
831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Xavier Noria
d22e522179 modernizes hash syntax in activerecord 2016-08-06 19:37:57 +02:00
lulalala
6e56a03f83 Fix reset_counters() crashing on has_many :through associations.
The counter column name in the intermediate model need to be access
via the through reflection.
2012-10-02 23:49:32 +08:00
David Heinemeier Hansson
ab4d455d6d Added missing files 2008-05-01 15:03:16 -05:00