aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/builder/belongs_to.rb
Commit message (Expand)AuthorAgeFilesLines
* Rename local variable `n` to `name`Ryuta Kamizono2019-04-241-2/+2
* Make association builder methods privateRyuta Kamizono2019-04-241-0/+3
* Avoid extra touch queries when counter cache is updatedRyuta Kamizono2018-09-271-2/+8
* Refactor counter cache to extract `decrement_counters_before_last_save` on th...Ryuta Kamizono2018-09-271-37/+6
* Update counter cache in memory if parent target is existedRyuta Kamizono2018-09-261-10/+3
* Don't update counter cache unless the record is actually savedRyuta Kamizono2018-09-191-3/+1
* Enable Style/ParenthesesAroundCondition copRyuta Kamizono2018-08-191-1/+1
* Extract `Relation#update_counters` for internal useRyuta Kamizono2018-07-301-6/+4
* Fix inconsistent touching behavior between assigning and unassigningRyuta Kamizono2018-05-271-1/+2
* Fix `belongs_to_counter_cache_after_update` to respect polymorphic type changeRyuta Kamizono2018-05-271-1/+1
* Avoid a subquery in updating counter cacheRyuta Kamizono2018-05-261-6/+1
* Fix `belongs_to_counter_cache_after_update` to respect custom primary key cou...Ryuta Kamizono2018-05-261-0/+13
* Fix conflicts `counter_cache` with `touch: true` by optimistic locking.bogdanvlviv2017-12-121-3/+7
* Merge pull request #29765 from lugray/fix_counter_cacheRafael França2017-07-241-3/+1
|\
| * Add test for fixed `counter_cache` double incrementLisa Ugray2017-07-191-3/+1
* | Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|/
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
* Evaluate the default block only when necessaryRyuta Kamizono2017-03-201-1/+1
* Add :default option to belongs_to (#28453)George Claghorn2017-03-171-1/+8
* Deprecate the behavior of AR::Dirty inside of after_(create|update|save) call...Sean Griffin2016-11-011-14/+16
* Fix counter_cache double increment bugTom Kadwill2016-04-281-0/+2
* Define `:foreign_type` as a valid option in `SingularAssociation`yui-knk2016-01-191-1/+1
* Make sure we touch all the parents when touch_later.Arthur Neves2015-12-061-2/+1
* Update belongs_to.rbEhsan Yousefi2015-11-081-2/+1
* docs, add missing `:nodoc: for `Associations::Builder`. [ci skip]Yves Senn2015-10-131-1/+1
* Fix counter_cache for polymorphic associationsStefan Kanev2015-07-191-4/+12
* Batch touch parent recordsArthur Neves2015-04-081-6/+7
* Require `belongs_to` by default.Josef Šimánek2015-02-211-1/+19
* Remove support to activerecord-deprecated_findersRafael Mendonça França2015-01-021-4/+2
* Merge pull request #12450 from iantropov/masterRafael Mendonça França2014-06-271-0/+5
|\
| * Fix bug, when ':dependent => :destroy' option violates foreign key constraint...Ivan Antropov2013-10-261-0/+4
* | Prevented belongs_to: touch propagating up if there are no changes being savedBrock Trappitt2014-05-211-1/+1
* | Hide BelongsToAssociation#increment_counters and #decrement_countersJean Boussier2014-04-151-1/+0
* | Use inheritance chain instead of callbacks to increment counter caches after ...Jean Boussier2014-04-141-16/+0
* | Use inheritance chain instead of callbacks to increment counter caches after ...Jean Boussier2014-04-141-12/+1
* | Make counter cache decrementation on destroy idempotentJean Boussier2014-04-131-4/+5
* | On destroying do not touch destroyed belongs to association.Paul Nikitochkin2013-12-231-1/+1
* | Revert the whole refactoring in the association builder classes.Rafael Mendonça França2013-12-111-2/+4
* | Bring back the valid_options class accessorRafael Mendonça França2013-12-111-1/+1
* | polymorphic belongs_to association with touch: true updates old record correctlySeverin Schoepke2013-12-051-1/+7
* | Raise `ArgumentError` when `has_one` is used with `counter_cache`Godfrey Chan2013-11-291-1/+1
* | Method visibility will not make difference hereRafael Mendonça França2013-10-091-2/+0
* | Move macro to class levelRafael Mendonça França2013-10-091-1/+1
* | Make valid_options a class methodRafael Mendonça França2013-10-091-1/+1
* | Push define_accessors to class level since we don't need anythig fromRafael Mendonça França2013-10-081-2/+2
* | Move add_counter_cache_methods to class levelRafael Mendonça França2013-10-081-2/+2
* | we can define callbacks without a builder instanceAaron Patterson2013-10-021-3/+3
* | push methods that don't depend on the instance to the classAaron Patterson2013-10-021-4/+4
* | decouple belongs_to callback definition from the builder instance.Aaron Patterson2013-10-021-4/+4