Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | default scopes should break the cache on singulur_association. | alfa-jpn | 2014-11-08 | 1 | -1/+2 |
| | | | | fixes #17495 | ||||
* | break cache if we're inside a "scoping" call. fixes #17052 | Aaron Patterson | 2014-10-14 | 1 | -1/+6 |
| | | | | | For now, we don't want to take "scoping" calls in to account when calculating cache keys for relations, so just opt-out. | ||||
* | Skip StatementCache for eager loaded associations (Fixes #16761) | Sammy Larbi | 2014-09-04 | 1 | -1/+1 |
| | | | | | | Eagerly loaded collection and singular associations are ignored by the StatementCache, which causes errors when the queries they generate reference columns that were not eagerly loaded. This commit skips the creation of the StatementCache as a fix for these scenarios. | ||||
* | use statement cache for belongs_to relations | Aaron Patterson | 2014-04-22 | 1 | -1/+12 |
| | |||||
* | extract record fetching to a method for belongs_to | Aaron Patterson | 2014-04-22 | 1 | -1/+5 |
| | |||||
* | [Active Record] Renamed private methods create_record and update_record | Prathamesh Sonpatki | 2014-02-20 | 1 | -3/+3 |
| | | | | | | This is to ensure that they are not accidentally called by the app code. They are renamed to _create_record and _update_record respectively. Closes #11645 | ||||
* | `has_one` and `belongs_to` accessors don't add ORDER BY to the queries anymore. | Rafael Mendonça França | 2014-01-21 | 1 | -1/+1 |
| | | | | | | | | | | Since Rails 4.0, we add an ORDER BY in the `first` method to ensure consistent results among different database engines. But for singular associations this behavior is not needed since we will have one record to return. As this ORDER BY option can lead some performance issues we are removing it for singular associations accessors. Fixes #12623. | ||||
* | remove the nil check from set_inverse_instance | Aaron Patterson | 2013-12-12 | 1 | -1/+3 |
| | | | | | methods that call set_inverse_instance with a record will not have to pay the cost of a nil check on every call | ||||
* | Remove useless comment and white spaces :scissors: [ci skip] | Carlos Antonio da Silva | 2013-09-01 | 1 | -1/+0 |
| | |||||
* | This is comment for singular association. | kennyj | 2012-11-02 | 1 | -1/+1 |
| | |||||
* | Remove mass_assignment_options from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -8/+8 |
| | |||||
* | s/scoped/scope/ | Jon Leighton | 2012-08-01 | 1 | -2/+2 |
| | |||||
* | Ensure that the foreign key gets set when doing record.create_association or ↵ | Jon Leighton | 2011-07-08 | 1 | -2/+11 |
| | | | | record.create_association. Fixes #1960. | ||||
* | Assign the association attributes to the associated record before the ↵ | Jon Leighton | 2011-06-30 | 1 | -2/+1 |
| | | | | before_initialize callback of the record runs. Fixes #1842. | ||||
* | Don't pass a block as we are yielding | Andrew White | 2011-05-17 | 1 | -1/+1 |
| | |||||
* | Add block setting of attributes to singular associations | Andrew White | 2011-05-17 | 1 | -5/+6 |
| | |||||
* | Pass the attribute and option hashes to build_association | Andrew White | 2011-05-17 | 1 | -6/+6 |
| | | | | | | | The build_association method was added as an API for plugins to hook into in 1398db0. This commit restores this API and the ability to override class.new to return a subclass based on a virtual attribute in the attributes hash. | ||||
* | Don't use mass-assignment protection when setting foreign keys or ↵ | Jon Leighton | 2011-05-12 | 1 | -9/+9 |
| | | | | association conditions on singular associations. Fixes #481 (again). | ||||
* | singular and collection relations in AR can now specify mass-assignment ↵ | Josh Kalderimis | 2011-05-01 | 1 | -8/+8 |
| | | | | security options (:as and :without_protection) in build, create and create! methods. | ||||
* | Add additional text to NotImplementedErrors [#6328 state:resolved] | Mike Gehard | 2011-03-12 | 1 | -1/+1 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Use proper objects to do the work to build the associations (adding methods, ↵ | Jon Leighton | 2011-02-21 | 1 | -0/+16 |
| | | | | callbacks etc) rather than calling a whole bunch of methods with rather long names. | ||||
* | Singular associations no longer use a proxy, so no need to check for the ↵ | Jon Leighton | 2011-02-21 | 1 | -6/+0 |
| | | | | proxy type on assignment. | ||||
* | Associations - where possible, call attributes methods rather than directly ↵ | Jon Leighton | 2011-02-21 | 1 | -1/+1 |
| | | | | accessing the instance variables | ||||
* | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -2/+2 |
| | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. | ||||
* | Let's be less blasé about method visibility on association proxies | Jon Leighton | 2011-01-30 | 1 | -0/+1 |
| | |||||
* | We shouldn't be using scoped.scoping { ... } to build associated records, as ↵ | Jon Leighton | 2011-01-30 | 1 | -6/+9 |
| | | | | this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved] | ||||
* | find_target can also go into SingularAssociation | Jon Leighton | 2011-01-16 | 1 | -0/+4 |
| | |||||
* | Abstract a bit more into SingularAssociation | Jon Leighton | 2011-01-16 | 1 | -0/+6 |
| | |||||
* | Abstract common code from BelongsToAssociation and HasOneAssociation into ↵ | Jon Leighton | 2011-01-16 | 1 | -0/+31 |
SingularAssociation |