Commit Graph

2884 Commits

Author SHA1 Message Date
Jon Leighton
fbe012e92d Ensure that calculations properly override the select value even if it's set in the default scope. Fixes #1395. 2011-05-31 21:12:20 +01:00
Erik Fonselius
a5806fa409 Failing test for aggregating on default_scope with select 2011-05-31 20:47:30 +01:00
Farley Knight
aa316e27b7 Tests for issue #1360 2011-05-31 19:47:34 +01:00
Jon Leighton
0bb8429e71 Reduce test noise 2011-05-31 18:18:14 +01:00
Arun Agrawal
e04f2c1d42 Opening class CascadedEagerLoadingTest at once. 2011-05-31 12:35:37 +05:30
Akira Matsuda
9fb51e76fd Disable IdentityMap by default for ActiveRecord testing
because enabling IM by default will possibly hide some bugs on 3.1 default behavior
2011-05-28 09:08:13 +09:00
Aaron Patterson
2a9b3abe19 Merge pull request #1229 from workmad3/master
Fix for Issue #1205
2011-05-27 14:34:05 -07:00
Aaron Patterson
8628948e2a fixing test for mysql2 2011-05-27 11:44:14 -07:00
Aaron Patterson
d1c74706c3 adding a test for #1322 2011-05-26 16:16:57 -07:00
Jon Leighton
602fff1f58 Merge pull request #1323 from fx/association_primary_key
use association_primary_key in AssociationScope#add_constraints
2011-05-26 13:08:10 -07:00
Jon Leighton
09e431aa89 Merge pull request #1318 from TheEmpty/master
Resolve issue #534
2011-05-26 12:54:38 -07:00
Mohammad Typaldos
ded7e35cb0 Removes a now needless test - via Github 2011-05-26 12:17:20 -07:00
John Mileham
294e2a8c2e Failing test - JSON serialization shouldn't merge base opts into include opts. 2011-05-26 11:24:25 -04:00
Marian Rudzynski
f4ed56df43 added assertion for non-standard primary_key on models used in the primary_key test 2011-05-26 12:40:09 +02:00
Marian Rudzynski
1f7c3d0264 use association_primary_key in AssociationScope#add_constraints 2011-05-26 11:00:27 +02:00
Mohammad El-Abid
ec44763f03 Removes the restriction on primary key when joining in a habtm && test that it was properly removed 2011-05-26 00:54:51 -04:00
Aaron Patterson
6b436c23a9 Merge pull request #1285 from joshk/remove_active_record_deprecations
removed deprecated methods, and related tests, from ActiveRecord
2011-05-25 13:48:35 -07:00
Franck Verrot
bf159aa5fc Test AR::Base#inspect on an allocated object not yet initialized 2011-05-25 13:53:51 +02:00
Josh Kalderimis
542114e1d8 removed deprecated methods, and related tests, from ActiveRecord 2011-05-25 02:29:32 +02:00
Jon Leighton
c69111ba5f Fix infinite recursion where a lazy default scope references a scope. Fixes #1264. 2011-05-25 00:08:14 +01:00
Jon Leighton
ce37f747cd Merge pull request #1254 from pixeltrix/ignore-includes-in-through-scope
Ignore :includes on through associations
2011-05-24 15:34:28 -07:00
Andrew White
f1f1ab77df Failing tests for #1233. 2011-05-24 23:25:21 +01:00
Aaron Patterson
559d809609 add tests surrounding behavior of save and save! for associations that have validation errors 2011-05-24 11:21:24 -07:00
Aaron Patterson
964338777d adding a test for create! with invalid associations 2011-05-24 11:06:36 -07:00
Aaron Patterson
0df8830160 do not bother with assert_nothing_raised, the test will fail and we get a better trace without it 2011-05-24 11:05:36 -07:00
Joey Butler
e106dbf039 Add failing test case for issue 796 2011-05-24 10:59:37 -07:00
David Workman
06436b2cad Added a test to check for correct behaviour with no options in add_index command recorder 2011-05-24 17:06:40 +01:00
dmathieu
79dc275b8d properly reference yml alias nodes
as per the last version of the yml specifications : http://www.yaml.org/spec/1.2/spec.html#* alias//
2011-05-24 11:18:28 +02:00
Andrew White
d8bd19f6ab Ignore :includes on through associations 2011-05-24 07:21:32 +01:00
Aaron Patterson
5ec23b95ba fixing 1.8 support for new fixture tests 2011-05-23 15:06:13 -07:00
Aaron Patterson
1716da0720 removing CSV fixture support 2011-05-23 15:06:12 -07:00
Aaron Patterson
081b36c6ce fixture file will validate fixture format 2011-05-23 15:06:12 -07:00
Aaron Patterson
5278af3d8e return an empty array for empty yaml files 2011-05-23 15:06:12 -07:00
Aaron Patterson
ad3f0eec75 adding AR::Fixtures::File class to wrap a fixture file 2011-05-23 15:06:12 -07:00
David Workman
a7fad65792 Simple fix for correctly inverting an add_index migration when a name has been provided 2011-05-23 13:54:51 +01:00
Jon Leighton
d7a910e31e Fix problem with loading polymorphic associations which have been defined in an abstract superclass. Fixes #552. 2011-05-22 21:25:02 +01:00
Santiago Pastorino
da8469fa7d Merge pull request #1187 from thedarkone/polymorphic-class-fix
Handle polymorphic_type NOT NULL columns
2011-05-21 09:43:42 -07:00
Andrew White
09daaaa1e0 Add support for passing mass assignment roles to dynamic finders. Closes #1170. 2011-05-21 16:33:54 +01:00
thedarkone
1c614bcb0f Handle polymorphic_type NOT NULL-able columns as well. 2011-05-21 15:18:09 +02:00
Guillermo Iguaran
23e94a67f8 Refactoring test_has_many_with_pluralize_table_names_false test 2011-05-20 01:53:13 -05:00
Guillermo Iguaran
6a3b3fba5a Allow pluralize_table_names for individual model 2011-05-20 01:44:13 -05:00
Jon Leighton
0afd5850f5 Implement proxy_owner, proxy_target and proxy_reflection methods on CollectionProxy with deprecations. Fixes #1148. 2011-05-19 23:28:44 +01:00
Andrew White
3773aa4fbb Add block setting of attributes to singular associations 2011-05-17 22:16:24 +01:00
Andrew White
42f1ad6865 Pass the attribute and option hashes to build_association
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.
2011-05-17 20:43:30 +01:00
Arun Agrawal
ed119aa5d6 Fixed InnerJoinAssociationTest. Need to load essays fixture. 2011-05-17 20:29:28 +05:30
Guillermo Iguaran
2c89ed9ad6 Adding missing require 2011-05-16 22:22:27 -05:00
Jon Leighton
2033ff825b Merge pull request #560 from guilleiguaran/fix_pluralize_table_names_false
Fixing has_many when ActiveRecord::Base.pluralize_table_names is false
2011-05-16 15:40:12 -07:00
Prem Sichanugrist
5ca67eca21 Add ActiveRecord::attribute_names to retrieve a list of attribute names. This method will also return an empty array on an abstract class or a model that the table doesn't exists. 2011-05-15 19:07:40 -04:00
Guillermo Iguaran
ecbde46e57 Fixing has_many association when ActiveRecord::Base.pluralize_table_names is false. fixes #557 2011-05-15 03:53:10 -05:00
Jon Leighton
60b23ea1da CollectionAssociation#merge_target_lists should write to the underlying attributes when copying, rather than using the assignment method 2011-05-14 19:49:22 +01:00