Commit Graph

36 Commits

Author SHA1 Message Date
David Heinemeier Hansson f2a29ca43c Added support for ODBC connections to MS SQL Server so you can connect from a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry] Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-01 17:20:04 +00:00
David Heinemeier Hansson c92ecb82b8 Fixed that multiparameter posts ignored attr_protected #1532 [alec+rails@veryclever.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-28 17:15:01 +00:00
David Heinemeier Hansson 3dfa56ccfb Updated all references to the old find_first and find_all to use the new style #1511 [Marcel Molina]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-26 11:25:32 +00:00
David Heinemeier Hansson deda0ee4a8 Fixed that clear_association_cache doesn't delete new associations on new records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-25 10:56:20 +00:00
Jamis Buck 37a370d8d4 Be sure to use the @finder_sql in the has_many association's #find method, even if explicit conditions have not been given.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-13 12:03:33 +00:00
Jamis Buck 2c0fa32088 Do not use instantiated fixtures (in general) in tests. Also, support the use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-10 14:58:02 +00:00
David Heinemeier Hansson bd79a4eb3b Fixed that clone would break when an aggregate had the same name as one of its attributes #1307 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 16:39:50 +00:00
David Heinemeier Hansson 24a9050b6e Changed the callbacks such that observers are notified before the in-object callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-02 16:46:30 +00:00
David Heinemeier Hansson 2bf223051e Added compatibility with camelCase column names for dynamic finders #533 [Dee.Zsombor]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-30 15:49:28 +00:00
David Heinemeier Hansson eefe4d0ddd Fixed extraneous comma in count() function that made it not work with joins #1156 [jarkko/Dee.Zsombor]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-30 15:45:15 +00:00
David Heinemeier Hansson 06f1895ac6 A few more tests #1199
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-30 13:24:43 +00:00
David Heinemeier Hansson f84044a83f decrease reliance on instantiated fixtures #980 [Jeremy Kemper]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1062 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-02 08:36:32 +00:00
David Heinemeier Hansson d2fefbe908 Added MultiparameterAssignmentErrors and AttributeAssignmentError exceptions #777 [demetrius]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-06 14:11:26 +00:00
David Heinemeier Hansson 4fbc3e30eb Changed the auto-timestamping feature to use ActiveRecord::Base.default_timezone instead of entertaining the parallel ActiveRecord::Base.timestamps_gmt method. The latter is now deprecated and will throw a warning on use (but still work) #710 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-24 12:00:42 +00:00
David Heinemeier Hansson 1aa82b3217 Added keyword-style approach to defining the custom relational bindings #545 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@527 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:26:57 +00:00
David Heinemeier Hansson 098fa94356 Fixed documentation snafus #575, #576, #577, #585
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:15:53 +00:00
David Heinemeier Hansson 336c2cbb8f Added an Oracle adapter that works with the Oracle bindings by Yoshida (http://raa.ruby-lang.org/project/oracle/) #564 [Maik Schmidt]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 14:06:00 +00:00
David Heinemeier Hansson 8382e6e506 Dont call id explicitly to do reloading that way we get rid of the warnings #583 [Tim Bates]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 13:47:14 +00:00
David Heinemeier Hansson 431e21cb45 Fixed Base#clone for use with PostgreSQL #565 [hanson@surgery.wisc.edu]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-07 13:43:44 +00:00
David Heinemeier Hansson 76242253ad Updated documentation for serialize
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@513 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-25 20:00:44 +00:00
David Heinemeier Hansson 66f44e6cbb Updated documentation for serialize
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-25 20:00:20 +00:00
David Heinemeier Hansson efa81dad51 Added the option of supplying an array of ids and attributes to Base#update, so that multiple records can be updated at once (inspired by #526/Duane Johnson). Added the option of supplying an array of attributes to Base#create, so that multiple records can be created at once. Added that Base#delete and Base#destroy both can take an array of ids to delete/destroy #336. Added that has_many association build and create methods can take arrays of record data like Base#create and Base#build to build/create multiple records at once.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-25 12:45:01 +00:00
David Heinemeier Hansson 0d2db8a7d1 Added Base.update_collection that can update an array of id/attribute pairs, such as the ones produced by the recent added support for automatic id-based indexing for lists of items #526 [Duane Johnson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@496 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-24 14:13:10 +00:00
David Heinemeier Hansson 566a36966b Added that update_all calls sanitize_sql on its updates argument, so stuff like MyRecord.update_all(['time = ?', Time.now]) works #519 [notahat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-24 13:06:12 +00:00
David Heinemeier Hansson 1d61845587 Fixed that records fetched with piggy-back attributes or through rich has_and_belongs_to_many associations couldn't be saved due to the extra attributes not part of the table #522 [Eric Anderson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-24 11:20:47 +00:00
David Heinemeier Hansson 95454bfb33 Added mass-assignment protection for the inheritance column -- regardless of a custom column is used or not
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-23 17:24:54 +00:00
David Heinemeier Hansson b067bf7884 Added Base#attributes that returns a hash of all the attributes with their 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
2005-01-11 00:45:26 +00:00
David Heinemeier Hansson 3ff5c5805f Added Base#reload that reloads the attributes of an object from the database #422 [Andreas Schwarz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@376 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-10 23:49:57 +00:00
David Heinemeier Hansson 393e98a859 Fixed Base#update_attribute to be indifferent to whether a string or symbol is used to describe the name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-06 02:36:33 +00:00
David Heinemeier Hansson d1abe806c5 Added Base#toggle(attribute) and Base#toggle!(attribute) that makes it 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
2005-01-06 02:31:35 +00:00
David Heinemeier Hansson daf3e92a31 Added a db2 adapter that only depends on the Ruby/DB2 bindings (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
2005-01-01 19:22:16 +00:00
David Heinemeier Hansson 60de8c1108 Added Base.default_timezone accessor that determines whether to use Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. This is set to :local by default.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-28 17:30:17 +00:00
David Heinemeier Hansson 69cb942d9b Changed the interface on AbstractAdapter to require that adapters return the number of affected rows on delete and update operations. Added that Base.update_all and Base.delete_all return an integer of the number of affected rows #341
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-19 16:21:55 +00:00
David Heinemeier Hansson 648b8fda54 Added Base.destroy and Base.delete to remove records without holding a reference to them first.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-17 21:36:13 +00:00
David Heinemeier Hansson 0daa29ece2 Added proper handling of time fields that are turned into Time objects with the dummy date of 2000/1/1 [HariSeldon]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@40 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 13:18:51 +00:00
David Heinemeier Hansson db045dbbf6 Initial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00