aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Oracle binary fixtures; pull fixture insertion into the adapters. Closes #7987.Jeremy Kemper2007-05-263-11/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6859 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Announce migration versions as they're performed.Jeremy Kemper2007-05-261-35/+41
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find gracefully copes with blank :conditions. Closes #7599.Jeremy Kemper2007-05-261-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_numericality_of takes :greater_than, :greater_than_or_equal_to, ↵Jeremy Kemper2007-05-261-14/+51
| | | | | | :equal_to, :less_than, :less_than_or_equal_to, :odd, and :even options. Closes #3952. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: create_database takes :charset and :collation options. Charset ↵Jeremy Kemper2007-05-261-9/+35
| | | | | | defaults to utf8. References #8448. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Find with a list of ids supports limit/offset. Closes #8437.Jeremy Kemper2007-05-251-2/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimistic locking: revert the lock version when an update fails. Closes ↵Jeremy Kemper2007-05-251-16/+23
| | | | | | #7840. Also return the number of affected rows instead of true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: add_column supports custom column types. Closes #7742. ↵Jeremy Kemper2007-05-251-14/+17
| | | | | | First-patch cheers to jsgarvin\! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Call the newly generated read method after generating it. Closes #8470.Jeremy Kemper2007-05-251-4/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6837 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Load database adapters on demand. Eliminates config.connection_adapters and ↵Jeremy Kemper2007-05-254-40/+43
| | | | | | RAILS_CONNECTION_ADAPTERS. Closes #8456. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that associations with :dependent => :delete_all respect :conditions ↵Rick Olson2007-05-241-4/+5
| | | | | | option. Closes #8034 [danger, joshpeek, Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix :through docs wrecked up by [6777]. Closes #4961.Jeremy Kemper2007-05-231-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to assignment creates a new proxy rather than modifying its target ↵Jeremy Kemper2007-05-221-4/+1
| | | | | | in-place. Closes #8412. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix column type detection while loading fixtures. Closes #7987 [roderickvd]Rick Olson2007-05-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document deep eager includes. Closes #6267.Jeremy Kemper2007-05-191-1/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert [4706] which added incorrect docs. References #5684.Jeremy Kemper2007-05-191-9/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #inspect for new records. Closes #8405.Jeremy Kemper2007-05-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to doesn't go :through. Closes #4961.Jeremy Kemper2007-05-181-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docs: warn that associations names shouldn't be reserved words. Closes #4378.Jeremy Kemper2007-05-181-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clarify :offset docs. Closes #3733.Jeremy Kemper2007-05-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pay tribute to timezones. Tune #inspect style.Jeremy Kemper2007-05-181-7/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sanitize Base#inspect. Closes #8392.Jeremy Kemper2007-05-182-2/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the transaction {|transaction|..} semantics with a new Exception ↵Michael Koziarski2007-05-182-8/+5
| | | | | | ActiveRecord::Rollback. Closes #8030 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: extract column length for CHAR also. Closes #7866.Jeremy Kemper2007-05-151-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sexy dumper now has its groove on (closes #8281) [Chris Wanstrath]David Heinemeier Hansson2007-05-111-9/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document :allow_nil option for validates_acceptance_of since it defaults to ↵Marcel Molina2007-05-061-0/+1
| | | | | | true. Closes #8050. [tzaharia] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update documentation for :dependent declaration so that it explicitly uses ↵Marcel Molina2007-05-061-1/+1
| | | | | | the non-deprecated API. Closes #8069. [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6686 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add documentation caveat about when to use count_by_sql. Closes #8090. ↵Marcel Molina2007-05-061-0/+9
| | | | | | [fearoffish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Also add documentation enhancements for increment_counter. Closes #8092. ↵Marcel Molina2007-05-061-5/+15
| | | | | | [fearoffish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enhance documentation for decrement_counter. Closes #8093. [fearoffish]Marcel Molina2007-05-061-1/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Provide brief introduction to what optimistic locking is. Closes #8097. ↵Marcel Molina2007-05-061-0/+10
| | | | | | [fearoffish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add documentation for :encoding option to mysql adapter. Closes #8219 [marclove]Marcel Molina2007-05-061-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added short-hand declaration style to migrations (inspiration from Sexy ↵David Heinemeier Hansson2007-05-061-1/+45
| | | | | | Migrations, http://errtheblog.com/post/2381) [DHH] Updated resource_scaffold and model generators to use short-hand style migrations [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Base#to_xml to take the name for a container element for an ↵Michael Koziarski2007-05-031-2/+2
| | | | | | association from the element name, not the first record's class name. Closes #7004 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug ↵David Heinemeier Hansson2007-04-281-1/+0
| | | | | | by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve Performance of calling create on has_many :through associations by ↵Michael Koziarski2007-04-261-7/+5
| | | | | | avoiding loading the target collection. Closes #8150 [evan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved performance by relying less on exception raising #8159 [Blaine]David Heinemeier Hansson2007-04-241-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Base.inspect to return a column-view like #<Post ↵David Heinemeier Hansson2007-04-211-0/+5
| | | | | | id:integer, title:string, body:text> [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Run with the latest versions so beta gems will workDavid Heinemeier Hansson2007-04-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH]David Heinemeier Hansson2007-04-131-2/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* documentation project patches, closes #7342, #7319, #7316, #7190 ↵Rick Olson2007-03-276-6/+32
| | | | | | [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add helpful debugging info to the ActiveRecord::StatementInvalid exception ↵Rick Olson2007-03-271-2/+2
| | | | | | in ActiveRecord::ConnectionAdapters::SqliteAdapter#table_structure. Closes #7925. [court3nay] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: binary escaping works with ='u'. Closes #7862.Jeremy Kemper2007-03-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6449 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support ↵Jeremy Kemper2007-03-181-1/+1
| | | | | | serialized attributes. Closes #7502. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix method visibility bug uncovered by #7854.Jeremy Kemper2007-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.update_all :order and :limit options. Useful for MySQL updates that ↵Jeremy Kemper2007-03-171-2/+8
| | | | | | must be ordered to avoid violating unique constraints. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated object transactions. People relying on this functionality ↵Michael Koziarski2007-03-162-732/+4
| | | | | | should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration ↵Jeremy Kemper2007-03-161-10/+0
| | | | | | test on 64-bit platforms since it may be a Time. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find_or_create_by_* takes a hash so you can create with more attributes than ↵Jeremy Kemper2007-03-141-2/+14
| | | | | | are in the method name. Closes #7368. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure with_scope takes both :select and :joins into account when setting ↵Michael Koziarski2007-03-131-1/+1
| | | | | | :readonly. Allows you to save records you retrieve using finders on a has_many :through associations. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de