aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixed that clone would break when an aggregate had the same name as one of ↵David Heinemeier Hansson2005-05-191-3/+31
| | | | | | its attributes #1307 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the callbacks such that observers are notified before the in-object ↵David Heinemeier Hansson2005-05-021-1/+8
| | | | | | callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added compatibility with camelCase column names for dynamic finders #533 ↵David Heinemeier Hansson2005-04-301-1/+2
| | | | | | [Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed extraneous comma in count() function that made it not work with joins ↵David Heinemeier Hansson2005-04-301-0/+12
| | | | | | #1156 [jarkko/Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* A few more tests #1199David Heinemeier Hansson2005-04-301-1/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* decrease reliance on instantiated fixtures #980 [Jeremy Kemper]David Heinemeier Hansson2005-04-021-21/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1062 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added MultiparameterAssignmentErrors and AttributeAssignmentError exceptions ↵David Heinemeier Hansson2005-03-061-0/+10
| | | | | | #777 [demetrius] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the auto-timestamping feature to use ↵David Heinemeier Hansson2005-02-241-2/+2
| | | | | | ActiveRecord::Base.default_timezone instead of entertaining the parallel ActiveRecord::Base.timestamps_gmt method. The latter is now deprecated and will throw a warning on use (but still work) #710 [Jamis Buck] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added keyword-style approach to defining the custom relational bindings #545 ↵David Heinemeier Hansson2005-02-071-0/+54
| | | | | | [Jamis Buck] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation snafus #575, #576, #577, #585David Heinemeier Hansson2005-02-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added an Oracle adapter that works with the Oracle bindings by Yoshida ↵David Heinemeier Hansson2005-02-071-0/+14
| | | | | | (http://raa.ruby-lang.org/project/oracle/) #564 [Maik Schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont call id explicitly to do reloading that way we get rid of the warnings ↵David Heinemeier Hansson2005-02-071-1/+1
| | | | | | #583 [Tim Bates] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#clone for use with PostgreSQL #565 [hanson@surgery.wisc.edu]David Heinemeier Hansson2005-02-071-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated documentation for serializeDavid Heinemeier Hansson2005-01-251-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@513 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated documentation for serializeDavid Heinemeier Hansson2005-01-251-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the option of supplying an array of ids and attributes to Base#update, ↵David Heinemeier Hansson2005-01-251-14/+22
| | | | | | so that multiple records can be updated at once (inspired by #526/Duane Johnson). Added the option of supplying an array of attributes to Base#create, so that multiple records can be created at once. Added that Base#delete and Base#destroy both can take an array of ids to delete/destroy #336. Added that has_many association build and create methods can take arrays of record data like Base#create and Base#build to build/create multiple records at once. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.update_collection that can update an array of id/attribute pairs, ↵David Heinemeier Hansson2005-01-241-0/+17
| | | | | | such as the ones produced by the recent added support for automatic id-based indexing for lists of items #526 [Duane Johnson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that update_all calls sanitize_sql on its updates argument, so stuff ↵David Heinemeier Hansson2005-01-241-0/+3
| | | | | | like MyRecord.update_all(['time = ?', Time.now]) works #519 [notahat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that records fetched with piggy-back attributes or through rich ↵David Heinemeier Hansson2005-01-241-1/+20
| | | | | | has_and_belongs_to_many associations couldn't be saved due to the extra attributes not part of the table #522 [Eric Anderson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added mass-assignment protection for the inheritance column -- regardless of ↵David Heinemeier Hansson2005-01-231-0/+7
| | | | | | a custom column is used or not git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#attributes that returns a hash of all the attributes with their ↵David Heinemeier Hansson2005-01-111-1/+6
| | | | | | names as keys and clones of their objects as values #433 [atyp.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#reload that reloads the attributes of an object from the database ↵David Heinemeier Hansson2005-01-101-1/+10
| | | | | | #422 [Andreas Schwarz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#update_attribute to be indifferent to whether a string or symbol ↵David Heinemeier Hansson2005-01-061-0/+3
| | | | | | is used to describe the name git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#toggle(attribute) and Base#toggle!(attribute) that makes it ↵David Heinemeier Hansson2005-01-061-1/+33
| | | | | | easier to flip a switch or flag. Added Base#increment!(attribute) and Base#decrement!(attribute) that also saves the records. Added Base#increment(attribute) and Base#decrement(attribute) that encapsulates the += 1 and -= 1 patterns. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a db2 adapter that only depends on the Ruby/DB2 bindings ↵David Heinemeier Hansson2005-01-011-3/+3
| | | | | | (http://raa.ruby-lang.org/project/ruby-db2/) #386 [Maik Schmidt]. Converted all the fixtures to YAML style ones. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.default_timezone accessor that determines whether to use ↵David Heinemeier Hansson2004-12-281-1/+10
| | | | | | Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. This is set to :local by default. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the interface on AbstractAdapter to require that adapters return the ↵David Heinemeier Hansson2004-12-191-2/+6
| | | | | | number of affected rows on delete and update operations. Added that Base.update_all and Base.delete_all return an integer of the number of affected rows #341 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.destroy and Base.delete to remove records without holding a ↵David Heinemeier Hansson2004-12-171-7/+23
| | | | | | reference to them first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added proper handling of time fields that are turned into Time objects with ↵David Heinemeier Hansson2004-12-011-0/+15
| | | | | | the dummy date of 2000/1/1 [HariSeldon] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@40 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* InitialDavid Heinemeier Hansson2004-11-241-0/+544
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de