aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Remove length alias of sizeDavid Heinemeier Hansson2005-01-111-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a differenciation between AssociationCollection#size and -length. Now ↵David Heinemeier Hansson2005-01-112-1/+15
| | | | | | AssociationCollection#size returns the size of the collection by executing a SELECT COUNT(*) query if the collection hasn't been loaded and calling collection.size if it has. If it's more likely than not that the collection does have a size larger than zero and you need to fetch that collection afterwards, it'll take one less SELECT query if you use length. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the 4.11 changes to the mysql adapterDavid Heinemeier Hansson2005-01-112-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@388 ↵David Heinemeier Hansson2005-01-112-0/+6
| | | | 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#attributes that returns a hash of all the attributes with their ↵David Heinemeier Hansson2005-01-113-1/+20
| | | | | | 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
* Fixed that foreign keys named the same as the association would cause stack ↵David Heinemeier Hansson2005-01-118-4/+36
| | | | | | overflow #437 [Eric Anderson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed default scope of acts_as_list from "1" to "1 = 1", so itll work in ↵David Heinemeier Hansson2005-01-112-1/+3
| | | | | | PostgreSQL (among other places) #427 [Alexey] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@380 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#reload that reloads the attributes of an object from the database ↵David Heinemeier Hansson2005-01-103-2/+20
| | | | | | #422 [Andreas Schwarz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added SQLite3 compatibility through the sqlite3-ruby adapter by Jamis Buck ↵David Heinemeier Hansson2005-01-107-86/+153
| | | | | | #381 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@374 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for the new protocol spoken by MySQL 4.1.1+ servers for the ↵David Heinemeier Hansson2005-01-103-0/+321
| | | | | | Ruby/MySQL adapter that ships with Rails #440 [Matt Mower] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some missing docsDavid Heinemeier Hansson2005-01-101-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@369 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that Observers can use the observes class method instead of ↵David Heinemeier Hansson2005-01-101-1/+5
| | | | | | overwriting self.observed_class() git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@367 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added time unit extensions to Fixnum that'll return the period in seconds, ↵David Heinemeier Hansson2005-01-101-0/+1
| | | | | | like 2.days + 4.hours git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added inclusion of fix for test/unit and rake problems with Ruby 1.8.2David Heinemeier Hansson2005-01-102-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@361 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that conditions in has_many and has_and_belongs_to_many should be ↵David Heinemeier Hansson2005-01-073-2/+4
| | | | | | interpolated just like the finder_sql is git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@344 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#update_attribute to be indifferent to whether a string or symbol ↵David Heinemeier Hansson2005-01-064-2/+7
| | | | | | 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-063-7/+93
| | | | | | 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
* Prepared for release of 0.9.3David Heinemeier Hansson2005-01-042-39/+39
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Minor tweak for readabilityDavid Heinemeier Hansson2005-01-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed some thread safety issues with DB2David Heinemeier Hansson2005-01-041-20/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@331 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed #406 for realDavid Heinemeier Hansson2005-01-041-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that validates_uniqueness_of used 'id' instead of defined primary key #406David Heinemeier Hansson2005-01-042-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@328 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the overwritten respond_to? method didn't take two parameters ↵David Heinemeier Hansson2005-01-031-2/+2
| | | | | | like the original #391 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the overwritten respond_to? method didn't take two parameters ↵David Heinemeier Hansson2005-01-032-2/+4
| | | | | | like the original #391 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the last details to please DB2David Heinemeier Hansson2005-01-033-4/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a YAML fixture on time coming out as an integer #415 [Dan Peterson]David Heinemeier Hansson2005-01-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added HasManyAssociation#count that works like Base#count #413 [intinig]David Heinemeier Hansson2005-01-023-0/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the possibility of specifying the remaining options for find_first and ↵David Heinemeier Hansson2005-01-021-8/+11
| | | | | | find_all with the new find_by/all_by* dynamic finders [danp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DB2 driver shouldnt be looking for RubyGems stuffDavid Heinemeier Hansson2005-01-021-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Brought install.rb up to date #408 [bitsweat]David Heinemeier Hansson2005-01-021-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@313 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@312 ↵David Heinemeier Hansson2005-01-021-34/+0
| | | | 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed handling of binary content in blobs and similar fields for Ruby/MySQL ↵David Heinemeier Hansson2005-01-023-4/+45
| | | | | | and SQLite #409 [xal] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added find_all style to the new dynamic findersDavid Heinemeier Hansson2005-01-024-5/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@308 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added dynamic attribute-based finders as a cleaner way of getting objects by ↵David Heinemeier Hansson2005-01-023-12/+57
| | | | | | simple queries without turning to SQL. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restored bind arity checking #412 [bitsweat]David Heinemeier Hansson2005-01-022-9/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@306 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that Base#find takes an optional options hash, including :conditions. ↵David Heinemeier Hansson2005-01-018-134/+246
| | | | | | Base#find_on_conditions deprecated in favor of #find with :conditions #407 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@305 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the latest two tables to the DB2 schemasDavid Heinemeier Hansson2005-01-011-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a db2 adapter that only depends on the Ruby/DB2 bindings ↵David Heinemeier Hansson2005-01-0137-70/+740
| | | | | | (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 the final touches to the Microsoft SQL Server adapter by DeLynn Berry ↵David Heinemeier Hansson2005-01-014-12/+57
| | | | | | that makes it suitable for actual use #394 [DeLynn Barry] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@302 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a bug in the Ruby/MySQL that caused binary content to be escaped badly ↵David Heinemeier Hansson2005-01-019-3/+68
| | | | | | and come back mangled #405 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated documentation for associations #387 [canadaduane]David Heinemeier Hansson2005-01-011-7/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@299 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added block-style for callbacks #332 [bitsweat]David Heinemeier Hansson2005-01-013-51/+290
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added automated optimistic locking if the field lock_version is present #384 ↵David Heinemeier Hansson2004-12-3111-3/+143
| | | | | | [Michael Koziarski] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@295 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added tests for acts_as_list with scope is null #378 [Tim Bates]David Heinemeier Hansson2004-12-311-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :counter_cache option to acts_as_tree that works just like the one you ↵David Heinemeier Hansson2004-12-312-2/+5
| | | | | | can define on belongs_to #371 [Josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed quoting in validates_format_of that would allow some rules to pass ↵David Heinemeier Hansson2004-12-313-2/+4
| | | | | | regardless of input #390 [Dmitry V. Sabanin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@288 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed broken transactions that were actually only running object-level and ↵David Heinemeier Hansson2004-12-301-0/+2
| | | | | | not db level transactions [andreas] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@286 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Restored thread safety to Active Record [andreas]David Heinemeier Hansson2004-12-301-10/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Transactions are now actually working on the database level on save, but ↵David Heinemeier Hansson2004-12-301-1/+2
| | | | | | thread safety is currently out the window. Andreas is working on it git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@284 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switch dispatcher to use the new shared Dependencies approachDavid Heinemeier Hansson2004-12-291-9/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@280 5ecf4fe2-1ee6-0310-87b1-e25e094e27de