aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10500 from kennyj/fix_10450Rafael Mendonça França2013-09-221-3/+3
|\ | | | | | | | | | | | | Fixed a bug in when using has_many association with :inverse_of option and UUID primary key. Conflicts: activerecord/CHANGELOG.md
| * Fixed a bug in when using has_many association with :inverse_of option and ↵kennyj2013-05-081-3/+3
| | | | | | | | UUID primary key.
* | Merge pull request #12137 from lann/fix_association_first_lastRafael Mendonça França2013-09-121-3/+1
|\ \ | | | | | | | | | | | | | | | | | | Make CollectionAssociation first/last with integer fetch with query Conflicts: activerecord/CHANGELOG.md
| * | Make CollectionAssociation first/last with integer fetch with queryLann Martin2013-09-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When first or last is called with an integer on an unloaded association, the entire collection is loaded. This differs surprisingly from the behavior of Relation#first/last, which translate the call into a limit query. For large collections this can make a big difference in performance. Change CollectionAssociation#fetch_first_or_last_using_find? to make this kind of call delegate to Relation.
* | | Merge pull request #12135 from dylanahsmith/avoid_empty_transactionRafael Mendonça França2013-09-111-1/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Avoid empty transaction from setting has_one association on new record. Conflicts: activerecord/CHANGELOG.md
| * | | Avoid empty transaction from setting has_one association on new record.Dylan Thacker-Smith2013-09-111-1/+2
| | | |
* | | | WhitespacesRafael Mendonça França2013-09-111-1/+2
| | | |
* | | | Merge pull request #12185 from SamSaffron/join_depRafael Mendonça França2013-09-111-1/+13
|\ \ \ \ | | | | | | | | | | Reduce allocations when extracting AR models
| * | | | Reduce allocations when extracting AR modelsSam2013-09-111-1/+13
| | | | |
* | | | | fix deleting join models with no pkAaron Patterson2013-09-111-1/+15
| |/ / / |/| | |
* | | | ask the association for records rather than calling `send`Aaron Patterson2013-09-101-1/+2
|/ / /
* / / hm:t join tables may not have a primary keyAaron Patterson2013-09-061-1/+5
|/ /
* | support anonymous classes on has_many associationsAaron Patterson2013-09-031-1/+1
| |
* | Remove useless comment and white spaces :scissors: [ci skip]Carlos Antonio da Silva2013-09-012-3/+2
| |
* | reduce relation allocationsAaron Patterson2013-08-301-1/+3
| |
* | require a class for cache computationsAaron Patterson2013-08-301-1/+1
| |
* | correctly typecast keys, remove conditionals, reduce object allocationsAaron Patterson2013-08-282-7/+11
| |
* | no need to to_a the scopeAaron Patterson2013-08-281-1/+1
| |
* | remove extra flat_map arrayAaron Patterson2013-08-281-8/+9
| |
* | avoid extra empty array allocationAaron Patterson2013-08-281-10/+10
| |
* | extract owner id calculation to a methodAaron Patterson2013-08-281-1/+5
| |
* | only call to_a when we have toAaron Patterson2013-08-282-2/+6
| |
* | remove intermediate variableAaron Patterson2013-08-271-3/+1
| |
* | cache association reset calculationAaron Patterson2013-08-271-4/+4
| |
* | query the association rather than send the method for the association nameAaron Patterson2013-08-271-5/+6
| |
* | Stray nodoc causes rest of file not parsed [ci skip]edogawaconan2013-08-221-2/+0
| |
* | Restore the use of `#add_to_target` for nested attribute updates on existing ↵Ben Woosley2013-08-121-4/+4
| | | | | | | | | | | | | | | | | | records, and don't bother updating the association if the update is going to be rejected anyway. This requires adding a `skip_callbacks` argument to `#add_to_target` so that we don't call the callbacks multiple times in this case, which is functionally an application of existing association data, rather than an addition of a new record to the association.
* | use flat_mapNeeraj Singh2013-08-031-1/+1
| |
* | use drop and avoid a range objectAaron Patterson2013-08-011-1/+1
| |
* | remove intermediate assignmentsAaron Patterson2013-08-012-7/+4
| |
* | push option handling "chrome" outside `initialize`Aaron Patterson2013-08-011-8/+7
| |
* | remove `valid_options` class methodAaron Patterson2013-08-011-4/+3
| |
* | association builder classes no longer need the modelAaron Patterson2013-08-012-7/+6
| | | | | | | | | | decouple the builder classes from the model. Builder objects should be easier to reuse now.
* | remove more mutations from the `build` methodAaron Patterson2013-08-011-7/+2
| |
* | make mutation method apis more consistentAaron Patterson2013-08-012-4/+5
| |
* | push more mutations outside the factory methodAaron Patterson2013-08-012-8/+6
| |
* | push module building to the constructorAaron Patterson2013-08-011-14/+20
| |
* | users should be warned if clobbering constantsAaron Patterson2013-08-011-3/+1
| |
* | defning extensions happens once, no need to cacheAaron Patterson2013-08-011-5/+3
| |
* | assert that constants have been set rather than the namesAaron Patterson2013-08-011-3/+3
| |
* | remove dead codeAaron Patterson2013-08-011-4/+0
| |
* | pushing out more callback definitionsAaron Patterson2013-08-011-2/+6
| |
* | push more mutations out of the builderAaron Patterson2013-08-012-12/+15
| | | | | | | | | | `configure_dependency` actually defined callbacks, so rename the method and move it to the appropriate method.
* | remove dependency on @model when defining callbacksAaron Patterson2013-08-012-8/+8
| |
* | extract more mutations to the callerAaron Patterson2013-08-012-13/+16
| |
* | separate some mutations from reflection constructionAaron Patterson2013-08-012-6/+6
| |
* | oops! :bomb:Aaron Patterson2013-07-311-1/+1
| |
* | do is_a? tests on assignment so runtime is fasterAaron Patterson2013-07-312-9/+12
| |
* | callback should always have a valueAaron Patterson2013-07-311-1/+1
| |
* | no need to to_symAaron Patterson2013-07-312-2/+2
| |