aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* eliminating method_missing on TableDefinitionAaron Patterson2010-09-291-2/+12
|
* fisting test organizationAaron Patterson2010-09-292-52/+50
|
* Revert "porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master"Aaron Patterson2010-09-281-6/+0
| | | | This reverts commit bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af.
* Set attributes properly for model built from association with conditions ↵Marcelo Giorgi2010-09-286-1/+47
| | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* fixing indentation warningAaron Patterson2010-09-281-1/+1
|
* Test add_index and remove_index with a symbol name #4891Étienne Barrié2010-09-281-0/+7
|
* porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to masterAaron Patterson2010-09-281-0/+6
|
* adding test cases for the dynamic finder matcher match methodAaron Patterson2010-09-271-0/+49
|
* @klass also uses DynamicFinderMatch, so no need for it on the relationAaron Patterson2010-09-271-0/+5
|
* make sure we use the engine assigned to the table when quotingAaron Patterson2010-09-271-0/+18
|
* Fix for #5579 involved the code change for both has_one and has_many ↵Neeraj Singh2010-09-271-1/+9
| | | | | | | | relationships. The path included test only for has_one. This patch adds test for has_many relationship. [#5706 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix for nested_attributes with has_many association fails when a single ↵Neeraj Singh2010-09-271-0/+8
| | | | | | | | record is being updated. [#5705 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* adding a test for slug behaviorAaron Patterson2010-09-271-0/+4
|
* Fix remove_index issue when provided :name is a symbolTim Connor2010-09-261-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Delegate ActiveRecord::Base.offset to scoped methods (analogous to limit) ↵Marcelo Giorgi2010-09-241-0/+6
| | | | | | [#5688 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* restore behavior of touch for models without :updated_xx [#5439 state:resolved]tnp2010-09-241-5/+13
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* reject_id option should be respected while using nested_attributesNeeraj Singh2010-09-241-0/+9
| | | | | | [#5579 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Hash#to_s behaves differently between 1.8 and 1.9, so adjust accordinglyAaron Patterson2010-09-231-1/+1
|
* testing poor behavior of hash serializationAaron Patterson2010-09-221-0/+4
|
* fixing tests. wooAaron Patterson2010-09-211-4/+7
|
* remove join table rows before removing owner row for habtm associations, ↵Hemant Kumar2010-09-211-1/+1
| | | | fixes#5674
* providing arel with column information when possible [#5392 state:resolved]Aaron Patterson2010-09-212-0/+19
|
* Remove helper methods that were moved to helper.rbEmilio Tagua2010-09-211-15/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move helper methods to helper.rb. Make test not depend on local TZ to pass ↵Emilio Tagua2010-09-212-9/+27
| | | | | | or fail. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix issue with remove_index and add unit test [#5645 state:resolved]Tim Connor2010-09-181-3/+4
|
* expanding the test to include both type of order declarationNeeraj Singh2010-09-183-8/+32
| | | | | | | | | while declaring default_scope Also added test for unscoped using block style with four different combinations Signed-off-by: José Valim <jose.valim@gmail.com>
* removing nonsensical tests, limit now actually adds a limitAaron Patterson2010-09-152-5/+1
|
* specific number of spaces should not be enforcedAaron Patterson2010-09-101-1/+1
|
* added a test for relation which checks intersection between a relation and ↵kane2010-09-101-0/+6
| | | | | | an array works in both directions Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
* fixed Subject model after_initialize callback for test_oracle_synonym testRaimonds Simanovskis2010-09-091-3/+7
|
* Fewer object allocationsJeremy Kemper2010-09-091-3/+3
|
* Cache unserialized attributesJeremy Kemper2010-09-091-9/+12
|
* Add tests for Relation#only.Emilio Tagua2010-09-091-0/+11
|
* serialized attributes should be serialized before validation [#5525 ↵Aaron Patterson2010-09-071-1/+5
| | | | state:resolved]
* fixed some issues with JSON encodingJakub Suder2010-09-071-0/+7
| | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* select should raise error when no block or no parameter is passedAaron Patterson2010-09-071-0/+4
|
* Cleanup deprecation warnings in active recordCarlos Antonio da Silva2010-09-063-56/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* failing test for reorder overriding default_scopeNick Ragaz2010-09-052-1/+7
| | | | | | [5528] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* order should always be concatenated.Neeraj Singh2010-09-055-6/+34
| | | | | | | | | | | | | | | | | | | | | | order that is declared first has highest priority in all cases. Here are some examples. Car.order('name desc').find(:first, :order => 'id').name Car.named_scope_with_order.named_scope_with_another_order Car.order('id DESC').scoping do Car.find(:first, :order => 'id asc') end No special treatment to with_scope or scoping. Also note that if default_scope declares an order then the order declared in default_scope has the highest priority unless with_exclusive_scope is used. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix copying migrations to empty directoryPiotr Sarnacki2010-09-032-0/+14
|
* Implemented ActiveRecord::Migrations#copy based on James Adam's ideaPiotr Sarnacki2010-09-039-0/+198
| | | | | | | | | | | | | | | ActiveRecord::Migration#copy allows to copy migrations from one place to another, changing migrations versions and adding scope to filename. For example: ActiveRecord::Migration.copy("db/migrate", :blog_engine => "vendor/gems/blog/db/migrate") will copy all migrations from vendor/gems/blog/db/migrate to db/migrate with such format: Versions of copied migrations will be reversioned to be appended after migrations that already exists in db/migrate
* A few schema changes for the SQL Server adapter.Ken Collins2010-09-031-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Reset default scope in Thread.current when class is unloaded [#5497 ↵Andrew White2010-09-011-0/+15
| | | | | | state:resolved] Signed-off-by: Xavier Noria <fxn@hashref.com>
* Fix test: this should return 0 not 7, since Arel was ignoring select clause ↵Emilio Tagua2010-09-011-1/+1
| | | | | | and now it's fixed. Signed-off-by: José Valim <jose.valim@gmail.com>
* nested attributes tests should rely on associated objects to verify results ↵Subba Rao Pasupuleti2010-09-011-57/+64
| | | | | | not on assert_difference [#5206 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Change relation merging to always append select, group and order valuesPratik Naik2010-08-314-48/+18
|
* Fixing typo [#5485 state:resolved]Thiago Pradi2010-08-281-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* @user.touch should not fail if User does not have updated_at/updated_on column.Neeraj Singh2010-08-241-1/+7
| | | | | | [#5439 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add test case for ActiveRecord::Base.record_timestamps = falseWincent Colaiuta2010-08-241-0/+10
| | | | | | | | This is a failing test case for Lighthouse ticket #5440: https://rails.lighthouseapp.com/projects/8994/tickets/5440 Signed-off-by: José Valim <jose.valim@gmail.com>
* use database from ARUNIT_DB_NAME environment variable when running tests on ↵Raimonds Simanovskis2010-08-231-19/+3
| | | | Oracle