aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/belongs_to_association.rb
Commit message (Expand)AuthorAgeFilesLines
* Use `try` only when we're unsure if the receiver would respond_to the methodAkira Matsuda2019-08-011-1/+1
* Refactor counter cache to extract `decrement_counters_before_last_save` on th...Ryuta Kamizono2018-09-271-11/+25
* Revert "Remove `counter_cache_target` which is no longer called"Ryuta Kamizono2018-09-261-1/+10
* Remove `counter_cache_target` which is no longer calledRyuta Kamizono2018-09-261-10/+1
* Don't update counter cache unless the record is actually savedRyuta Kamizono2018-09-191-16/+0
* Extract `Relation#update_counters` for internal useRyuta Kamizono2018-07-301-7/+4
* Fix inconsistent touching behavior between assigning and unassigningRyuta Kamizono2018-05-271-1/+1
* Fix `belongs_to_counter_cache_after_update` to respect polymorphic type changeRyuta Kamizono2018-05-271-0/+4
* Fix `different_target?` to respect custom primary key counterRyuta Kamizono2018-05-261-3/+6
* Eager loading won't mutate owner recordRyuta Kamizono2018-05-251-1/+3
* Don't expose `SingularAssociation#replace` which is internal APIRyuta Kamizono2018-05-161-13/+12
* Fix dependence on has_one/belongs_to relationshipsFernando Gorodscy2018-03-061-1/+9
* Bugfix foreign key replacement in inverse associationBogdan Gusiev2017-12-271-7/+7
* Fix conflicts `counter_cache` with `touch: true` by optimistic locking.bogdanvlviv2017-12-121-2/+2
* Fix broken doc for Active Record [ci skip]Yoshiyuki Hirano2017-08-251-1/+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 belongs_to :default option against the owner, not the associationGeorge Claghorn2017-04-271-1/+1
* Evaluate the default block only when necessaryRyuta Kamizono2017-03-201-2/+2
* Add :default option to belongs_to (#28453)George Claghorn2017-03-171-0/+4
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
* Fix counter_cache double increment bugTom Kadwill2016-04-281-0/+1
* Make #increment! and #decrement! methods concurency safeBogdan Gusiev2015-10-051-27/+19
* raise ActiveModel::MissingAttributeError when trying to access a relationship...Diego Carrion2015-06-161-1/+1
* Improve consistency of counter caches updating in memorySean Griffin2015-01-261-0/+3
* Improve the performance of reading belongs_to associationsSean Griffin2014-12-221-5/+6
* add has_one? method and reuse instead of checking macroeileencodes2014-06-091-1/+1
* Hide BelongsToAssociation#increment_counters and #decrement_countersJean Boussier2014-04-151-2/+2
* Use inheritance chain instead of callbacks to increment counter caches after ...Jean Boussier2014-04-141-4/+14
* extract cache counter logic to one methodAaron Patterson2013-12-121-11/+10
* remove duplicate codeAaron Patterson2013-12-121-15/+6
* extract a method for updating without a record objectAaron Patterson2013-12-121-6/+10
* extract methods out of the cache update methodAaron Patterson2013-12-121-14/+22
* pull a nil check up one frameAaron Patterson2013-12-121-6/+10
* remove more nil checksAaron Patterson2013-12-121-6/+5
* remove nil checkAaron Patterson2013-12-121-6/+10
* remove the nil check from set_inverse_instanceAaron Patterson2013-12-121-1/+1
* Remove useless comment and white spaces :scissors: [ci skip]Carlos Antonio da Silva2013-09-011-2/+2
* Adding a bang to method name of raise_on_type_mismatch.wangjohn2013-03-211-1/+1
* BELONGS TO ASSOCIATION | Typo fixlibin2013-02-251-1/+1
* improved different_target conditionsAngelo Capilleri2013-01-081-2/+5
* move dependency logic out of generated methodsJon Leighton2012-08-101-0/+5
* @stale_state should be nil when a model isn't saved.kennyj2012-04-131-1/+1
* Some refactor for association.kennyj2012-04-121-0/+5
* Fix belongs_to polymorphic with custom primary key on target.Jon Leighton2011-09-261-1/+5
* Don't find belongs_to target when the foreign_key is NULL. Fixes #2828Georg Friedrich2011-09-051-0/+4
* Fix exception if old and new targets are both nil. Fixes #1471.Jon Leighton2011-07-121-1/+1
* Rename target_klass to klassJon Leighton2011-02-211-1/+1
* Delegate Association#options to the reflection, and replace 'reflection.optio...Jon Leighton2011-02-211-1/+1