aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Refactored in use of extract_options! (closes #9079) [josh]David Heinemeier Hansson2007-07-246-13/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :unless clause to validations (closes #8003) [monki]David Heinemeier Hansson2007-07-243-9/+105
| | | | 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-203-1/+22
| | | | | | :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-173-10/+26
| | | | 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-166-40/+16
| | | | | | [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-165-14/+18
| | | | | | 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-152-220/+4
| | | | | | 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-113-2/+5
| | | | | | 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-092-3/+28
| | | | | | 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-092-4/+9
| | | | 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-092-7/+12
| | | | | | 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-074-1/+13
| | | | | | #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-304-4/+24
| | | | | | :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-273-6/+6
| | | | | | 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-273-7/+18
| | | | | | 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-273-2/+8
| | | | | | #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-257-12/+37
| | | | | | #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-233-5/+9
| | | | | | [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-232-1/+2
| | | | 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-233-12/+33
| | | | 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-226-122/+57
| | | | 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-213-4/+14
| | | | 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-203-3/+14
| | | | 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 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-119-248/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated push_with_attributes.Jeremy Kemper2007-06-113-204/+134
| | | | 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-113-4/+10
| | | | 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-083-20/+1
| | | | 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-073-1/+20
| | | | 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-052-1/+3
| | | | | | Closes #8553. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6944 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-054-11/+32
| | | | 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-013-1/+24
| | | | 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-312-5/+18
| | | | | | 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-312-4/+13
| | | | 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-306-92/+111
| | | | 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-302-3/+42
| | | | 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-303-1/+11
| | | | | | 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-304-10/+13
| | | | 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-293-0/+16
| | | | | | Closes #8507, #6004. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Workaround test isolation failure with Task.attr_protected :starting.Jeremy Kemper2007-05-291-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6892 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-296-15/+33
| | | | | | SQL statements. Closes #8466. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de