aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly require active_record/query_cache before using it.Jeremy Kemper2007-09-081-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix assertion for the mysql default work around committed earlier.Michael Koziarski2007-09-051-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :allow_blank to validations. Like allow_nil, but for values which are ↵Michael Koziarski2007-09-051-0/+18
| | | | | | +blank?+. [jnoon] Closes #7383 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix bug where unserializing an attribute attempts to modify a frozen ↵Rick Olson2007-09-041-0/+9
| | | | | | @attributes hash for a deleted record. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Work around mysql limitations for defaults on text columns with not null. ↵Michael Koziarski2007-09-042-2/+2
| | | | | | Closes #9324 [caio] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated functionality from edge rails. Closes #9387 [lifofifo]Michael Koziarski2007-09-035-219/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure QueryCache doesn't try to dup numeric results (does not affect the ↵Michael Koziarski2007-09-021-1/+7
| | | | | | major OS database). Closes #7661 [tomafro, nzkoz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove commented out test which refers to old code, old bugs and uses ↵Michael Koziarski2007-08-291-22/+0
| | | | | | ObjectSpace in a nasty way. [nzkoz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pass the right binding when string is passed to :if with validations. ↵Michael Koziarski2007-08-281-0/+22
| | | | | | [caspercg] Closes #9300 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure create! raises errors on validation when creating multiple ↵Michael Koziarski2007-08-281-0/+6
| | | | | | records. [hasmanyjosh] Closes #8952 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7361 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve performance and functionality of the postgresql adapter. Closes ↵Michael Koziarski2007-08-164-34/+234
| | | | | | #8049 [roderickvd] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't clobber :includes passed to count on has_many association. Closes ↵Michael Koziarski2007-08-161-0/+6
| | | | | | #9175 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure has_many associations honour :include when counting. Closes #9167 ↵Michael Koziarski2007-08-162-0/+8
| | | | | | [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change the implementation of ActiveRecord's attribute reader and writer methods:Michael Koziarski2007-08-143-29/+10
| | | | | | | | | | | * Generate Reader and Writer methods which cache attribute values in hashes. This is to avoid repeatedly parsing the same date or integer columns. * Move the attribute related methods out to attribute_methods.rb to de-clutter base.rb * Change exception raised when users use find with :select then try to access a skipped column. Plugins could override missing_attribute() to lazily load the columns. * Move method definition to the class, instead of the instance * Always generate the readers, writers and predicate methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make habtm respect the :select option. Closes #9207. [Aleksey Kondratenko]Michael Koziarski2007-08-072-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Let inspect on AR classes work when the table doesn't exist. Closes #9194 ↵Michael Koziarski2007-08-061-0/+4
| | | | | | [tarmo, nzkoz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* dont call #collect on a string when returning query cache results. Closes ↵Rick Olson2007-07-251-0/+6
| | | | | | #9099 [norbert] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7239 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Perform a deep #dup on query cache results so that modifying activerecord ↵Rick Olson2007-07-251-18/+19
| | | | | | attributes does not modify the cached attributes. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that has_many :through associations use a count query instead of ↵Rick Olson2007-07-251-0/+6
| | | | | | loading the target when #size is called. Closes #8800 [lifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :unless clause to validations (closes #8003) [monki]David Heinemeier Hansson2007-07-241-6/+59
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #count on a has_many :through association so that it recognizes the ↵Rick Olson2007-07-201-1/+10
| | | | | | :uniq option. Closes #8801 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix and properly document/test count(column_name) usage. Closes #8999 [lifofifo]Rick Olson2007-07-171-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated count(conditions=nil, joins=nil) usage. Closes #8993 ↵Rick Olson2007-07-163-12/+3
| | | | | | [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change belongs_to so that the foreign_key assumption is taken from the ↵Rick Olson2007-07-162-7/+9
| | | | | | association name, not the class name. Closes #8992 [hasmanyjosh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove spurious tests from deprecated_associations_test, most of these ↵Michael Koziarski2007-07-151-220/+2
| | | | | | aren't deprecated, and are duplicated in associations_test. Closes #8987 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make create! on a has_many :through association return the association ↵Michael Koziarski2007-07-111-1/+1
| | | | | | object. Not the collection. Closes #8786 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support for non heterogeneous arrays when serializing to xml. Unless ↵Tobias Lütke2007-07-091-2/+17
| | | | | | guessable from array name the type name will be included as attribute git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make [7169] work as expected with indented XML. Tobias Lütke2007-07-091-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include empty has_many/has_and_belongs_to_many associations as empty array ↵Tobias Lütke2007-07-091-0/+8
| | | | | | tags when serializing to XML git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move from select * to select tablename.* to avoid clobbering IDs. Closes ↵Michael Koziarski2007-07-071-0/+9
| | | | | | #8889 [dasil003] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't call unsupported methods on associated objects when using :include, ↵Michael Koziarski2007-06-302-2/+18
| | | | | | :method with to_xml [manfred, jwilger] Closes #7307 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add the type="array" moniker to has_many / has_and_belongs_to_many ↵Tobias Lütke2007-06-272-5/+5
| | | | | | associations upon serialization. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Define collection singular ids method for has_many :through associations. ↵Jeremy Kemper2007-06-271-5/+13
| | | | | | Closes #8763. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Array attribute conditions work with proxied association collections. Closes ↵Jeremy Kemper2007-06-271-1/+5
| | | | | | #8318. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix polymorphic has_one associations declared in an abstract class. Closes ↵Jeremy Kemper2007-06-255-3/+34
| | | | | | #8638. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed validates_associated should not stop on the first error (closes #4276) ↵David Heinemeier Hansson2007-06-231-4/+6
| | | | | | [mrj/manfred/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mock the beginning of the transaction also. References #8642.Jeremy Kemper2007-06-231-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback if commit raises an exception. Closes #8642.Jeremy Kemper2007-06-231-10/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update tests' use of fixtures for the new collections api. Closes #8726.Jeremy Kemper2007-06-225-122/+55
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Save associated records only if the association is already loaded. Closes #8713.Jeremy Kemper2007-06-211-1/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: fix show_variable. Closes #8448.Jeremy Kemper2007-06-201-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove extra debug line. Closes #8681 [Giles Bowkett]Rick Olson2007-06-181-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7059 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated find_first and find_all.Jeremy Kemper2007-06-114-164/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated push_with_attributes.Jeremy Kemper2007-06-112-182/+129
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Base#inspect when not every attribute is present. Closes #8623.Jeremy Kemper2007-06-111-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback [6961] which breaks SQLite tests. Reference #7345.Jeremy Kemper2007-06-081-16/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote db path so SQLite AR tests work on Windows. Closes #5278 ↵Jeremy Kemper2007-06-082-2/+2
| | | | | | [mislav@nippur.irb.hr] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: raise if a column is duplicated. Closes #7345.Jeremy Kemper2007-06-071-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo. Closes #7504 [aurelianito]Jeremy Kemper2007-06-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: people(:technomancy, :josh) returns both fixtures. Closes #7880.Jeremy Kemper2007-06-052-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de