aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/bulb.rb
Commit message (Collapse)AuthorAgeFilesLines
* use existing model for testing Base.create with #after_initializeGabriel Horner2011-07-241-0/+5
|
* Assign the association attributes to the associated record before the ↵Jon Leighton2011-06-301-2/+7
| | | | before_initialize callback of the record runs. Fixes #1842.
* Pass the attribute and option hashes to build_associationAndrew White2011-05-171-0/+13
| | | | | | | 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.
* CollectionAssociation#merge_target_lists should write to the underlying ↵Jon Leighton2011-05-141-0/+4
| | | | attributes when copying, rather than using the assignment method
* Add test to specify that attributes from an association's conditions should ↵Jon Leighton2011-05-101-0/+2
| | | | be assigned without mass-assignment protection when a record is built on the association.
* Un-deprecate using 'default_scope' as a macro, but if you are calling the ↵Jon Leighton2011-04-181-4/+1
| | | | macro multiple times that will give deprecation warnings, and in 3.2 we will simply overwrite the default scope when you call the macro multiple times.
* Deprecated support for passing hashes and relations to default_scope, in ↵Jon Leighton2011-04-121-6/+7
| | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
* We shouldn't be using scoped.scoping { ... } to build associated records, as ↵Jon Leighton2011-01-301-2/+9
| | | | this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
* While creating a new record using has_many create method default scope of ↵Neeraj Singh2010-08-191-0/+7
child should be respected. author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>