aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #4543 from jdelStrother/find_or_initJon Leighton2012-02-011-0/+12
| | | | Don't instantiate two objects in collection proxy / find_or_instantiate_by
* Fix broken tests added by 85c724d59Rafael Mendonça França2012-01-313-13/+13
|
* Merge pull request #4783 from gregolsen/ids_reader_fixJon Leighton2012-01-312-0/+5
| | | | ids_reader method fixed, test added to has_many association (for PostgreSQL)
* Allow writing unknown attributes, but with a deprecation warning. Closes #4583.Jon Leighton2012-01-311-0/+7
|
* Add workaround and deprecation if the inherited hook is not executed. Closes ↵Jon Leighton2012-01-311-0/+10
| | | | #4757.
* Merge pull request #4763 from kennyj/fix_4754Jon Leighton2012-01-311-0/+16
| | | | [MySQL] Fix GH #4754. Remove double-quote characters around PK when using sql_mode=ANSI_QUOTES
* Merge pull request #4715 from pwim/find-create-multi-argsJon Leighton2012-01-271-0/+11
| | | | Fix regression from Rails 3.1
* Merge pull request #4696 from rafaelfranca/issue-4653Aaron Patterson2012-01-261-2/+0
|\ | | | | Remove extra attributes from HABTM join tables in AR tests
| * Remove extra attributes from HABTM join tables in AR testsRafael Mendonça França2012-01-261-2/+0
| | | | | | | | | | | | | | | | | | HABTM Join tables should not have extra attributes When extra attributes is needed in HABTM join tables is better to use `has_many :through` association. Fix #4653
* | disable automatic explain if there is no logger [closes #4671]Xavier Noria2012-01-261-1/+15
|/
* call to_s on value passed to table_name=Sergey Nartimov2012-01-261-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix another race condition.Jon Leighton2012-01-201-0/+8
| | | | | | | | | | From 2c667f69aa2daac5ee6c29ca9679616e2a71532a. Thanks @pwnall for the heads-up. Conflicts: activerecord/lib/active_record/core.rb
* Merge pull request #4531 from exviva/pessimistic_with_lockAaron Patterson2012-01-191-0/+20
| | | | Add ActiveRecord::Base#with_lock
* Merge pull request #4487 from sarenji/fix-reset-countersAaron Patterson2012-01-176-2/+43
| | | | Fix bug where reset_counters resets the wrong counter cache.
* Fix table_name in ActiveRecord with more than one abstract ancestorsPiotr Sarnacki2012-01-121-0/+11
| | | | | | | | | | | | | | | | | When subclassing abstract_class table_name should be always computed based on class name, no matter if superclass is subclassing base or another abstract_class. So: class FirstAbstract < ActiveRecord::Base self.abstract_class = true end class SecondAbstract < FirstAbstract self.abstract_class = true end class Post < SecondAbstract self.table_name #=> 'posts' (not 'second_abstracts') end
* on and ON are type casted to a true boolean columnSantiago Pastorino2012-01-111-0/+29
|
* Merge pull request #4408 from tomstuart/read-and-write-attribute-aliasesSantiago Pastorino2012-01-111-1/+40
| | | | #[] and #[]= are no longer interchangeable with #read_attribute and #write_attribute
* Merge pull request #4282 from edgecase/order_after_reorderAaron Patterson2012-01-042-1/+7
| | | | correctly handle order calls after a reorder
* Fix GH #4285. Remove options when we record calling creat_tablekennyj2012-01-041-0/+6
|
* Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_idsAaron Patterson2011-12-281-0/+10
| | | | allow reorder to affect eager loading correctly
* avoid deprecation warnings when running AR testsAaron Patterson2011-12-242-2/+7
|
* Fix #4046.Jon Leighton2011-12-233-0/+22
|
* serialize fails on subclassAlvaro Bautista2011-12-234-6/+32
|
* Make ActiveRecord::Relation#pluck work with serialized attributesJon Leighton2011-12-221-1/+8
|
* added failing tests for has_many, has_one and belongs_to associations with ↵Jakub Kuźma2011-12-213-7/+65
| | | | | | strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051 Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge pull request #4014 from lest/bypass-preloading-for-ids-readerJon Leighton2011-12-181-0/+6
|\ | | | | bypass preloading for ids_reader
| * bypass preloading for ids_readerSergey Nartimov2011-12-181-0/+6
| | | | | | | | | | when fetching ids for a collection, bypass preloading to avoid the unnecessary performance overhead
* | call scope within unscoped to prevent duplication of where valuesSergey Nartimov2011-12-172-0/+7
|/
* Delete obsolete commentJon Leighton2011-12-161-1/+0
|
* Should clear the primary keys cache alsoJon Leighton2011-12-161-1/+5
|
* Don't store defaults in the schema cacheJon Leighton2011-12-162-1/+2
|
* Cache columns at the model level.Jon Leighton2011-12-164-21/+34
| | | | Allows two models to use the same table but have different primary keys.
* Let AttributeMethods do its own including etcJon Leighton2011-12-151-4/+2
|
* Split out most of the AR::Base code into separate modules :cake:Jon Leighton2011-12-151-13/+0
|
* Fix #3987.Jon Leighton2011-12-151-0/+10
|
* Allow nested attributes in associations to update values in it's owner ↵Andrew Kaspick2011-12-142-1/+9
| | | | object. Fixes a regression from 3.0.x
* Remove that there copy/pasted code :bomb:Jon Leighton2011-12-141-5/+0
|
* Don't try to autosave nested assocs. Fixes #2961.Jon Leighton2011-12-141-0/+14
|
* Stop the build asploding on 1.8.7Jon Leighton2011-12-141-0/+4
|
* Add return for 1.8.7Jon Leighton2011-12-141-1/+1
|
* Unfluff the CI.Jon Leighton2011-12-141-1/+1
| | | | | | | | | | | | | | | With transactional fixtures enabled, the session records would end up in @_current_transaction_records, and at the end of the transaction, methods would be called on them that would trigger method_missing and trigger attribute methods to be generated. However, at this point the sessions table would not exist, and the columns were not cached, so an exception would be raised because we can't find the columns to generate attribute methods for. Not sure exactly why this didn't crop up before but there have been changes to the schema cache code and perhaps that means that column data that was cached previously at that point is now uncached.
* Revert naive O(1) table_exists? implementation.Jon Leighton2011-12-131-0/+1
| | | | | | | | | | It was a bad idea to rescue exceptions here. This can interfere with transaction rollbacks which seems to be the cause of current CI failure. Instead, each adapter should implement its own DB-specific O(1) implementation, and we fall back on the generic, slower, implementation otherwise.
* Errno::ENOENT error makes more sense when a file cannot be foundAaron Patterson2011-12-101-1/+1
|
* Allow to filter migrations by passing a blockPiotr Sarnacki2011-12-091-0/+18
| | | | | | | | | | Example: ActiveRecord::Migrator.migrate(path) do |migration| migration.name =~ /User/ end The above example will migrate only migrations with User in the name
* Use `table_exists?` from the schema cache.Aaron Patterson2011-12-092-3/+4
|
* Compare migrations for copying only by name and scopePiotr Sarnacki2011-12-091-26/+1
|
* Add suffix for migrations copied from enginesPiotr Sarnacki2011-12-091-23/+23
|
* String#to_a is not available in 1.9Piotr Sarnacki2011-12-091-1/+1
|
* Run also migrations in subdirectories.Piotr Sarnacki2011-12-094-0/+42
| | | | | With this commit, ActiveRecord will also look for migrations in db/migrate subdirectories.
* Ignore origin comment when checking for duplicates on Migration.copyPiotr Sarnacki2011-12-092-3/+38
| | | | | | | 49ebe51 fixed copying migrations, but existing migrations would still trigger warnings. The proper way to compare migrations is to ignore origin lines - if migration is identical it means that we can silently skip it, regardless where it comes from.