aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Docfix (closes #5143)David Heinemeier Hansson2006-10-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5257 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added update_attributes! which uses save! to raise an exception if a ↵David Heinemeier Hansson2006-10-093-1/+46
| | | | | | validation error prevents saving (closes #6192) [jonathan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated add_on_boundary_breaking (use validates_length_of instead) ↵David Heinemeier Hansson2006-10-094-18/+16
| | | | | | (closes #6292) [BobSilva] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Doc fixes (closes #6325)David Heinemeier Hansson2006-10-091-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The has_many create method works with polymorphic associations. Closes #6361.Jeremy Kemper2006-10-083-4/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update RUNNING_UNIT_TESTS for current Rake tasks. Closes #6349.Jeremy Kemper2006-10-051-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* callbacks that return false should cause save to return falseJamis Buck2006-10-041-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add a failing test so we can make it happy againJamis Buck2006-10-041-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: introduce Mysql::Result#all_hashes to support further optimization. ↵Jeremy Kemper2006-10-022-10/+43
| | | | | | Closes #5581. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* save! shouldn't validate twice. Closes #6324.Jeremy Kemper2006-10-023-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Association collections have an _ids reader method to match the existing ↵Jeremy Kemper2006-10-013-1/+47
| | | | | | writer for collection_select convenience (e.g. employee.task_ids). The writer method skips blank ids so you can safely do @employee.task_ids = params[:tasks] without checking every time for an empty list or blank values. References #1887, Closes #5780. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5214 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add an attribute reader method for ActiveRecord::Base.observers [Rick Olson]Rick Olson2006-09-302-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5211 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use class name as XML_TYPE_NAMES key.Jeremy Kemper2006-09-292-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include caller of deprecated count method.Jeremy Kemper2006-09-291-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: count class method should be called with an options hash rather ↵Jeremy Kemper2006-09-269-25/+50
| | | | | | than two args for conditions and joins. Closes #6287. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_one associations with a nil target may be safely marshaled. Closes #6279.Jeremy Kemper2006-09-263-2/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* organize associations testsJeremy Kemper2006-09-256-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* use a real testJeremy Kemper2006-09-251-9/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Duplicate the hash provided to AR::Base#to_xml to prevent unexpected side ↵Michael Koziarski2006-09-243-1/+18
| | | | | | effects [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add a :namespace option to AR::Base#to_xml [Koz]Michael Koziarski2006-09-173-3/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5130 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Version updates and missing licensesDavid Heinemeier Hansson2006-09-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Stray code.Jeremy Kemper2006-09-151-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation tests. Remove warnings for dynamic finders and for the foo_count ↵Jeremy Kemper2006-09-1516-281/+393
| | | | | | ethod if it's also an attribute. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mock Time.now for more accurate Touch mixin tests. Closes #6213.Jeremy Kemper2006-09-142-10/+46
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve yaml fixtures error reporting. Closes #6205.Jeremy Kemper2006-09-132-13/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* We cant make MySQL 5 happy if it means making SQLite and PostgreSQL cry. So ↵David Heinemeier Hansson2006-09-083-4/+2
| | | | | | currently MySQL 5 is not fully supported for Rails when youre using eager loading (closes #6133, #6135). I have contacted MySQL to make them fix http://bugs.mysql.com/bug.php?id=13551 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added parentheses around FROM clauses generated by Base and associations ↵David Heinemeier Hansson2006-09-083-2/+4
| | | | | | since MySQL 5 claim that to be the standard (and will screw up joins if its not there), see http://bugs.mysql.com/bug.php?id=13551 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5073 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback [4917]. Closes #785.Jeremy Kemper2006-09-073-6/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Backed out of new_record? to new? transformation as it would screw up ↵David Heinemeier Hansson2006-09-0518-124/+136
| | | | | | existing models that did boolean calls on "new" attributes [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated ActiveRecord::Base.new_record? in favor of ↵David Heinemeier Hansson2006-09-0518-136/+124
| | | | | | ActiveRecord::Base.new? (old version still works until Rails 2.0) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rename quote to quote_value so the name can be used in AR models. #3628 [Koz]Michael Koziarski2006-09-048-22/+37
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add deprecation warning for inferred foreign key. #6029 [Josh Susser]Rick Olson2006-09-043-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the Ruby/MySQL adapter we ship with Active Record to work with the new ↵David Heinemeier Hansson2006-09-042-5/+22
| | | | | | authentication handshake that was introduced in MySQL 4.1, along with the other protocol changes made at that time (closes #5723) [jimw@mysql.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4990 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: use :dependent => :delete_all rather than ↵Jeremy Kemper2006-09-044-4/+12
| | | | | | :exclusively_dependent => true. Closes #6024. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4981 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document validates_presences_of behavior with booleans: you probably want ↵Jeremy Kemper2006-09-042-0/+6
| | | | | | validates_inclusion_of :attr, :in => [true, false]. Closes #2253. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* set ActiveSupport::Deprecation.debug = true to see backtraces for ↵Jeremy Kemper2006-09-041-0/+4
| | | | | | deprecation callers. off by default. on for Rails tests. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimistic locking: gracefully handle nil versions, treat as zero. Closes #5908.Jeremy Kemper2006-09-044-0/+43
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update copyright timesDavid Heinemeier Hansson2006-09-032-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Validation testsJeremy Kemper2006-09-031-30/+40
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4918 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_confirmation_of only kicks in when the attribute, rather than its ↵Jeremy Kemper2006-09-032-1/+4
| | | | | | confirmation, is present. Closes #785. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4917 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml: the :methods option works on arrays of records. Closes #5845.Jeremy Kemper2006-09-024-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: update docs. Closes #5998.Jeremy Kemper2006-09-013-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Commit stray fixture.Jeremy Kemper2006-09-021-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add some XmlSerialization tests for ActiveRecord [Rick Olson]Rick Olson2006-09-012-0/+106
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_many :through conditions are sanitized by the associating class. Closes ↵Jeremy Kemper2006-09-018-5/+20
| | | | | | #5971. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Tighten rescue clauses. Closes #5985.Jeremy Kemper2006-08-311-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix spurious newlines and spaces in AR::Base#to_xml outputJamis Buck2006-08-302-14/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_one supports the :dependent => :delete option which skips the typical ↵Jeremy Kemper2006-08-299-16/+64
| | | | | | callback chain and deletes the associated object directly from the database. Closes #5927. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nested subclasses are not prefixed with the parent class' table_name since ↵Jeremy Kemper2006-08-253-12/+39
| | | | | | they should always use the base class' table_name. Closes #5911. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLServer: work around bug where some unambiguous date formats are not ↵Jeremy Kemper2006-08-253-3/+20
| | | | | | correctly identified if the session language is set to german. Closes #5894. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de