aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* adding tests for previous_changes hashAaron Patterson2012-01-191-0/+25
|
* just use an alias. The target method is public, so make this one publicAaron Patterson2012-01-191-4/+1
| | | | too.
* avoid useless is_a checksAaron Patterson2012-01-191-8/+8
|
* Merge pull request #4531 from exviva/pessimistic_with_lockAaron Patterson2012-01-193-1/+70
|\ | | | | Add ActiveRecord::Base#with_lock
| * Add ActiveRecord::Base#with_lockOlek Janiszewski2012-01-183-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `with_lock` method to ActiveRecord objects, which starts a transaction, locks the object (pessimistically) and yields to the block. The method takes one (optional) parameter and passes it to `lock!`. Before: class Order < ActiveRecord::Base def cancel! transaction do lock! # ... cancelling logic end end end After: class Order < ActiveRecord::Base def cancel! with_lock do # ... cancelling logic end end end
* | select doesn't take multiple arguments - fixes #4539 [ci skip]Vijay Dev2012-01-191-5/+5
|/ | | | | Also, fixed the bit about returning AM::MissingAttributeError. This seems to be fixed earlier in 3-2-stable only.
* Merge pull request #4487 from sarenji/fix-reset-countersAaron Patterson2012-01-177-3/+45
|\ | | | | Fix bug where reset_counters resets the wrong counter cache.
| * Fix bug where reset_counters resets the wrong counter cache.David Peter2012-01-167-3/+45
| | | | | | | | | | | | | | | | If a model belongs_to two associations with the same class, then reset_counters will reset the wrong counter cache. Finding the right reflection should use the foreign_key instead, which should be unique.
* | disable transactions for this testAaron Patterson2012-01-171-1/+4
| |
* | validate related records in the same validation context as parent.Emmanuel Oga2012-01-173-2/+19
|/ | | | | | | | | | | | | | | | | | | | E.G.: ```ruby class Parent < ActiveRecord::Base has_one :child validates_presence_of :name, :on => "custom_context" validates_associated :child end class Child < ActiveRecord::Base belongs_to :parent validates_presence_of :name, :on => "custom_context" end p = Parent.new(:name => "Montoto", :child => Child.new) p.valid?(:custom_context) # => Returns true, even though the child is not valid under the same context. ```
* stop more ddl changesAaron Patterson2012-01-162-14/+16
|
* stop ddl modifications for another testAaron Patterson2012-01-162-12/+10
|
* use one based indexes for the mock migrationsAaron Patterson2012-01-161-16/+16
|
* stop making ddl changes for migrator testsAaron Patterson2012-01-162-67/+78
|
* actually use the variable I created. :bomb: thanks @exvivaAaron Patterson2012-01-161-1/+1
|
* move another migrator to use sensorsAaron Patterson2012-01-162-12/+18
|
* Make it more explicit that the feature is deprecated, not removed.Jon Leighton2012-01-161-2/+4
|
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-1623-66/+216
| | | | | | See the CHANGELOG for details. Fixes #950.
* infer references from Relation#orderJon Leighton2012-01-162-2/+28
|
* store references as a stringJon Leighton2012-01-164-8/+8
|
* Avoid sanitize_sql when we can use Relation#where insteadJon Leighton2012-01-164-22/+16
|
* automatically add references when we canJon Leighton2012-01-163-1/+29
|
* Make referencing an included item trigger eager loadingJon Leighton2012-01-162-1/+13
|
* Add ActiveRecord::Relation#references (#950)Jon Leighton2012-01-164-4/+35
|
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-1627-181/+99
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* moving verbosity tests to the migrator test, removing ddl changesAaron Patterson2012-01-163-20/+25
|
* silencing migrator tests, refactoring the migration test helperAaron Patterson2012-01-164-23/+13
|
* fix tests on sqlite3Aaron Patterson2012-01-161-0/+4
|
* prefer method sensors over actual ddl changesAaron Patterson2012-01-162-69/+84
|
* testing the current version methodAaron Patterson2012-01-161-1/+26
|
* test that migrations have connections, and method missing delegatesAaron Patterson2012-01-161-7/+16
|
* making sure the temp connection and the real connection are different after dupAaron Patterson2012-01-161-3/+3
|
* Merge pull request #4480 from lest/use-rack-body-proxyJosé Valim2012-01-166-102/+37
|\ | | | | Use Rack::BodyProxy
| * use Rack::BodyProxy in activerecord middlewaresSergey Nartimov2012-01-166-102/+37
| |
* | Try to create schema migrations table in schema dumper testPiotr Sarnacki2012-01-161-0/+5
| |
* | Fix ActiveRecord mysql testsPiotr Sarnacki2012-01-161-1/+2
|/ | | | | | | | | TL;DR: MySQL sucks. Since it does not support transactions for schema changes, when you run `create_table` in setup block, it will commit current transaction. Now tests want to run `RELEASE SAVEPOINT` after finishing tests which fails since there is no transaction.
* Delegate clear_active_connections to handler as wellCarlos Antonio da Silva2012-01-141-6/+2
|
* make sure the migration table is alive and emptyAaron Patterson2012-01-132-2/+12
|
* refactor schema migration table creation to the schema migration modelAaron Patterson2012-01-134-10/+21
|
* Fix race condition :bomb:Jon Leighton2012-01-131-4/+11
|
* stop depending on the filesystem for interleaved migration testsAaron Patterson2012-01-138-84/+49
|
* convert the migration list to a Set, remove duplicate codeAaron Patterson2012-01-132-16/+18
|
* deprecate the block argument to Migrator#migrateAaron Patterson2012-01-131-8/+19
|
* refactor the migrate method to filter migrations before running themAaron Patterson2012-01-132-26/+33
|
* move schema dumper tests to the correct classAaron Patterson2012-01-132-9/+10
|
* use the schema migration model to dump schema infoAaron Patterson2012-01-132-3/+8
|
* move another migrator test, use schema migration modelAaron Patterson2012-01-132-10/+9
|
* use the model to delete recordsAaron Patterson2012-01-131-4/+1
|
* move another migrator test to the correct classAaron Patterson2012-01-132-11/+11
|
* use the schema migration model to create a new recordAaron Patterson2012-01-131-2/+1
|