aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* removing unused codeAaron Patterson2010-08-221-2/+2
|
* Do not use time zone in test_read_attributes_before_type_cast_on_datetime ↵Raimonds Simanovskis2010-08-221-3/+3
| | | | | | for Oracle database As currently string_to_time method is not doing time zone conversion to database time zone
* updated test_should_record_timestamp_for_join_table for OracleRaimonds Simanovskis2010-08-221-1/+1
|
* reload bob after his journy to a new timezoneBrian Lopez2010-08-201-0/+1
|
* fisting after_rollback and after commit callbacksAaron Patterson2010-08-202-5/+14
|
* While creating a new record using has_many create method default scope of ↵Neeraj Singh2010-08-194-0/+32
| | | | | | | | | | | 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>
* removing useless ternaryAaron Patterson2010-08-191-1/+1
|
* Memoize STI class lookups for the duration of a requestJeremy Kemper2010-08-191-1/+1
|
* avoids warnings about mismatched indentations in Ruby 1.9.2Xavier Noria2010-08-192-9/+6
|
* get rid of the warning "+ after local variable is interpreted as binary ↵Xavier Noria2010-08-191-13/+13
| | | | operator even though it seems like unary operator" in Ruby 1.9.2
* Bug Fix -- clean up connection after stored procedure [#3151 state:resolved]Jeff Lawson2010-08-173-0/+27
|
* Restore pet -> owner relationship to the previous stateSantiago Pastorino2010-08-161-1/+1
| | | | [#5365]
* added testcase for belongs_to with a counter_cache and touchMark Turner2010-08-161-0/+16
| | | | | | [#5365 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* code gardening: we have assert_(nil|blank|present), more concise, with ↵Xavier Noria2010-08-1710-14/+14
| | | | better default failure messages - let's use them
* added dependencies in Gemfile for running ActiveRecord tests with Oracle ↵Raimonds Simanovskis2010-08-161-6/+1
| | | | database
* assert_equal hereSantiago Pastorino2010-08-161-2/+2
|
* Revert "Makes AR use AMo to_key implementation"Santiago Pastorino2010-08-151-1/+1
| | | | This reverts commit 36a84a4f15f29b41c7cac2f8de410055006a8a8d.
* Makes topics.written_on null => true back again some tests rely on thatSantiago Pastorino2010-08-151-0/+3
|
* Add missing modelSantiago Pastorino2010-08-141-0/+2
|
* Both tests are using the same model, move the model to another file and add ↵Santiago Pastorino2010-08-143-15/+17
| | | | the missing require
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-1435-102/+101
| | | | 's/[ \t]*$//' -i {} \;)
* Makes AR use AMo to_key implementationSantiago Pastorino2010-08-131-1/+1
| | | | [#5249]
* Ensure we can nest include calls [#5285 state:resolved]Neeraj Singh2010-08-125-1/+26
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make update_attribute behave as in Rails 2.3 and document the behavior ↵José Valim2010-08-122-20/+28
| | | | intrinsic to its implementation.
* fixed indentation in test casesMark Turner2010-08-113-4/+3
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Raising exception if fixture file can't be foundPaul Hieromnimon2010-08-111-0/+11
|
* Added test case to verify that transaction callbacks are correctly ↵Tobias Lütke2010-08-091-0/+41
| | | | propagated to class observers
* ignore this test for mysql2Brian Lopez2010-08-091-13/+15
|
* bringing over latest from masterBrian Lopez2010-08-099-547/+581
|\
| * test to ensure that respond_to? delegates to arelAaron Patterson2010-08-061-0/+19
| |
| * sorry AR, my privates are none of your businessAaron Patterson2010-08-061-7/+0
| |
| * do not rely on arel class structureAaron Patterson2010-08-061-0/+7
| |
| * query value is converted to_s instead of to_yamlRainerBlessing2010-08-031-0/+8
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * Dynamic finder method like scoped_by_* create methods so thatNeeraj Singh2010-08-031-0/+6
| | | | | | | | | | | | | | method_missing is not hit next time. Adding a test for this scenario. Signed-off-by: José Valim <jose.valim@gmail.com>