aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/singular_association.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove the nil check from set_inverse_instanceAaron Patterson2013-12-121-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 Silva2013-09-011-1/+0
|
* This is comment for singular association.kennyj2012-11-021-1/+1
|
* Remove mass_assignment_options from ActiveRecordGuillermo Iguaran2012-09-161-8/+8
|
* s/scoped/scope/Jon Leighton2012-08-011-2/+2
|
* Ensure that the foreign key gets set when doing record.create_association or ↵Jon Leighton2011-07-081-2/+11
| | | | record.create_association. Fixes #1960.
* Assign the association attributes to the associated record before the ↵Jon Leighton2011-06-301-2/+1
| | | | before_initialize callback of the record runs. Fixes #1842.
* Don't pass a block as we are yieldingAndrew White2011-05-171-1/+1
|
* Add block setting of attributes to singular associationsAndrew White2011-05-171-5/+6
|
* Pass the attribute and option hashes to build_associationAndrew White2011-05-171-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 Leighton2011-05-121-9/+9
| | | | association conditions on singular associations. Fixes #481 (again).
* singular and collection relations in AR can now specify mass-assignment ↵Josh Kalderimis2011-05-011-8/+8
| | | | security options (:as and :without_protection) in build, create and create! methods.
* Add additional text to NotImplementedErrors [#6328 state:resolved]Mike Gehard2011-03-121-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use proper objects to do the work to build the associations (adding methods, ↵Jon Leighton2011-02-211-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 Leighton2011-02-211-6/+0
| | | | proxy type on assignment.
* Associations - where possible, call attributes methods rather than directly ↵Jon Leighton2011-02-211-1/+1
| | | | accessing the instance variables
* Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-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 proxiesJon Leighton2011-01-301-0/+1
|
* We shouldn't be using scoped.scoping { ... } to build associated records, as ↵Jon Leighton2011-01-301-6/+9
| | | | this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
* find_target can also go into SingularAssociationJon Leighton2011-01-161-0/+4
|
* Abstract a bit more into SingularAssociationJon Leighton2011-01-161-0/+6
|
* Abstract common code from BelongsToAssociation and HasOneAssociation into ↵Jon Leighton2011-01-161-0/+31
SingularAssociation