aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
Commit message (Collapse)AuthorAgeFilesLines
* Add tests to test that through associations are not readonly, and we can ↵kuahyeow2012-03-081-0/+11
| | | | update the records we retrive from the association
* Merge pull request #5316 from Jacobkg/masterJosé Valim2012-03-071-0/+3
| | | | Update ActiveRecord::AttributeMethods#attribute_present? to return false for empty strings
* Fix #5069 - Protect foreign key from mass assignment throught association ↵Jean Boussier2012-03-052-0/+38
| | | | builder
* Only run binary type cast test with encode! on Ruby 1.9Carlos Antonio da Silva2012-03-041-6/+8
|
* only log an error if there is a logger. fixes #5226Aaron Patterson2012-03-021-0/+9
| | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
* Merge pull request #5096 from lawso017/masterAaron Patterson2012-02-211-3/+7
| | | | Restoring ability to derive id/sequence from tables with nonstandard sequences for primary keys
* fix test with ruby 187-p358Arun Agrawal2012-02-181-1/+5
|
* Use real table and columns for index testRafael Mendonça França2012-02-081-3/+3
|
* Push proper test changes for previous commit conflicts.José Valim2012-02-081-2/+4
|
* Handle nil in add_index :length option in MySQLPaul Sadauskas2012-02-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Our schema.rb is being generated with an `add_index` line similar to this: add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil} This is the same as it was on Rails 3.1.3, however, now when that schema.rb is evaluated, its generating bad SQL in MySQL: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: CREATE UNIQUE INDEX `xxx` ON `foo` (`foo`(8), `bar`()) This commit adds a check for nil on the length attribute to prevent the empty parens from being output. Conflicts: activerecord/test/cases/migration/index_test.rb Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix attribute_before_type_cast for serialized attributes. Fixes #4837.Jon Leighton2012-02-071-0/+15
| | | | | | Conflicts: activerecord/lib/active_record/core.rb
* let automatic EXPLAIN ignore CACHE notificationsXavier Noria2012-02-031-0/+48
|
* Merge pull request #4809 from cfeist/feist-sqlite-binary-corruptionAaron Patterson2012-02-021-1/+1
| | | | Fix for SQLite binary data corrupter (to master branch)
* 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-312-12/+12
|
* Merge pull request #4783 from gregolsen/ids_reader_fixJon Leighton2012-01-311-0/+4
| | | | 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
* 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-171-2/+18
| | | | 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-232-6/+26
|
* 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-212-5/+63
| | | | | | 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-171-0/+5
|/
* 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-141-0/+5
| | | | 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
|