aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Define collection singular ids method for has_many :through associations. ↵Jeremy Kemper2007-06-271-2/+3
| | | | | | 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/+1
| | | | | | #8318. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow sweepers to be created solely for expiring after controller actions, ↵David Heinemeier Hansson2007-06-261-3/+7
| | | | | | not model changes [DHH] Added assigns method to ActionController::Caching::Sweeper to easily access instance variables on the controller [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix polymorphic has_one associations declared in an abstract class. Closes ↵Jeremy Kemper2007-06-251-9/+1
| | | | | | #8638. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #8096)David Heinemeier Hansson2007-06-231-3/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7107 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #8674)David Heinemeier Hansson2007-06-231-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed validates_associated should not stop on the first error (closes #4276) ↵David Heinemeier Hansson2007-06-231-1/+1
| | | | | | [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-1/+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-2/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Save associated records only if the association is already loaded. Closes #8713.Jeremy Kemper2007-06-211-3/+3
| | | | 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-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated quote methods, replaced by quote_value so quote can be ↵Jeremy Kemper2007-06-111-12/+0
| | | | | | used as an attribute name. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated find_first and find_all.Jeremy Kemper2007-06-115-84/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated push_with_attributes.Jeremy Kemper2007-06-111-22/+5
| | | | 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-3/+4
| | | | 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-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: raise if a column is duplicated. Closes #7345.Jeremy Kemper2007-06-071-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: report the number of rows affected when calling insert, update, ↵Jeremy Kemper2007-06-051-0/+1
| | | | | | delete, etc. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: correctly delete and insert fixtures in a single transaction. ↵Jeremy Kemper2007-06-051-1/+1
| | | | | | Closes #8553. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: people(:technomancy, :josh) returns both fixtures. Closes #7880.Jeremy Kemper2007-06-051-9/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Calculations support non-numeric foreign keys. Closes #8154.Jeremy Kemper2007-06-011-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.inspect handles Base itself and abstract_class? Don't use #<Foo ...> ↵Jeremy Kemper2007-05-311-2/+9
| | | | | | since that notation's typically used for instances of a class, not the class itself. Closes #8490 [deepblue] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix an edge case with find with a list of ids, limit, and offset. Closes #8437.Jeremy Kemper2007-05-311-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* with_scope is protected. Closes #8524.Jeremy Kemper2007-05-304-92/+104
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quickref for association methods. Closes #7723.Jeremy Kemper2007-05-301-3/+40
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Calculations: return nil average instead of 0 when there are no rows to ↵Jeremy Kemper2007-05-301-1/+1
| | | | | | average. Closes #8298. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* acts_as_nested_set: direct_children is sorted correctly. Closes #4761.Jeremy Kemper2007-05-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise an exception if both attr_protected and attr_accessible are declared. ↵Jeremy Kemper2007-05-291-0/+2
| | | | | | Closes #8507, #6004. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo in PostgreSQL change_column quoting. References #8466.Jeremy Kemper2007-05-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Missed Oracle rename_column quoting. References #8466.Jeremy Kemper2007-05-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite, MySQL, PostgreSQL, Oracle: quote column names in column migration ↵Jeremy Kemper2007-05-294-15/+20
| | | | | | SQL statements. Closes #8466. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]Rick Olson2007-05-281-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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