Commit Graph

840 Commits

Author SHA1 Message Date
Florian Weber
ee1ef122d7 Better language for the CHANGELOG entry of previous commit.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-21 16:59:54 +00:00
Florian Weber
c6e01f5b60 Fixed that saving a model with multiple habtm associations, would only save the first habtm association.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3331 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-21 15:50:31 +00:00
David Heinemeier Hansson
43f6643b8b Fix form_for use of datetime_select and date_select as well as a few stylistic upgrades to AR
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-21 06:16:42 +00:00
Scott Barron
b05f0c8e49 Oops, I killed Tobi's changelog entries.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3328 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 23:14:56 +00:00
Scott Barron
88bb279df7 Fix change_column to work with postgres 7.x and 8.x.
Closes #3141


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 21:43:47 +00:00
Tobias Lütke
581f12b7b1 removed :piggyback in favor of just allowing :select on :through associations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 21:26:27 +00:00
Tobias Lütke
90099e9dc2 made .find() and class method delegation work on :through relations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 21:20:35 +00:00
Scott Barron
d5441b2d50 DRY up PG's add_column a bit to use change_column_default and match the other
methods.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 20:37:19 +00:00
Tobias Lütke
1d2c6ee8f3 added :piggyback option to has_many :through relationships to pick up values from the join table as needed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 20:32:47 +00:00
Scott Barron
1235d26bfb Check for the key instead of the value, because it (the value) can be false.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 20:24:19 +00:00
Marcel Molina
3c01e01ded Fix typo in association docs. Closes #3296.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3320 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-20 03:26:17 +00:00
Tobias Lütke
5f06c483ca Fixed :through relations when using STI inherited classes would use the inherited class's name as foreign key on the join model
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-16 23:24:58 +00:00
Jeremy Kemper
4ac2593e4e Roll back [3244]. References #3116.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3294 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 17:32:39 +00:00
Jeremy Kemper
224d47e0a3 MySQL: allow encoding option for mysql.rb driver.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3293 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 16:45:58 +00:00
David Heinemeier Hansson
e5d9ad3e29 Added option inheritance for find calls on has_and_belongs_to_many and has_many assosociations [DHH] Added option to specify :group, :limit, :offset, and :select options from find on has_and_belongs_to_many and has_many assosociations [DHH]
Added form_remote_for (form_for meets form_remote_tag) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-13 00:39:51 +00:00
David Heinemeier Hansson
6427db6baa Added tests for join models and fixed a bug #3177
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-11 18:06:51 +00:00
Jeremy Kemper
809dd8e87e MySQL: fixes for the bundled mysql.rb driver. References #3160.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3274 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-10 21:38:28 +00:00
Jeremy Kemper
42576fffe2 SQLServer: fix obscure optimistic locking bug, support uniqueidentifier columns, cope with tables names qualified by owner, cope with columns with desc in the name, cope with primary keys with select in the name. Closes #3068, #2930, #3067, #1950, #3057, #3162.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-10 00:52:41 +00:00
Jeremy Kemper
39b71bb8a1 MySQL: ensure that @config is set.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 23:20:20 +00:00
Jeremy Kemper
a40b6fd034 Fix bundled mysql.rb to correctly check for PROTO_41. Fixed scramble41 with nil password. Fixed change_user with PROTO_41.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-09 22:59:54 +00:00
Jeremy Kemper
dc106b932c Fix some test failures due to MySQL assumptions. Closes #3149.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3254 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 23:23:34 +00:00
Jeremy Kemper
57838bd4c6 Oracle: active? performs a select instead of a commit. References #3133.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3252 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 07:27:48 +00:00
David Heinemeier Hansson
32b27f997b Remove insignificant classes from docs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:43:54 +00:00
Jeremy Kemper
cf54a71352 MySQL: more robust test for nullified result hashes. References #3124.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3246 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 05:07:45 +00:00
Jeremy Kemper
df901ce345 SQLite: find database file when RAILS_ROOT is a symlink. References #3116.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:51:18 +00:00
Jeremy Kemper
d496db1388 Reloading an instance refreshes its aggregations as well as its associations. References #3024.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:46:57 +00:00
David Heinemeier Hansson
e466fc45ca Fixed that using :include together with :conditions array in Base.find would cause NoMethodError (closes #2887) [Paul Hammmond]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:44:54 +00:00
Jeremy Kemper
c1537e89f8 PostgreSQL: more robust sequence name discovery. References #3087.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:34:26 +00:00
Jeremy Kemper
bae97ef483 Oracle: use syntax compatible with Oracle 8. References #3131.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 04:21:38 +00:00
David Heinemeier Hansson
c7bdd00b86 Fixed RDoc warnings [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-08 03:23:31 +00:00
David Heinemeier Hansson
4263490728 Fix has_many :through
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-07 23:20:11 +00:00
David Heinemeier Hansson
88f9418c77 Dont overwrite the documentation from the real base class
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-05 23:38:49 +00:00
Jeremy Kemper
3ed6675c68 Clear the connection cache entry when a new connection is established on the same class.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3222 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-05 21:48:23 +00:00
Jeremy Kemper
b13573ed37 Clear connection cache after rolling back transaction.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-05 19:58:11 +00:00
Jeremy Kemper
0632f5a93e Move dummy active? and reconnect! from sqlite to base adapter. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 06:15:04 +00:00
Jeremy Kemper
dc64887f21 Connection cache to speed up retrieve_connection and get rid of dirty connection marking. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:56:49 +00:00
Jeremy Kemper
1dfa0bd372 Don't use transactional fixtures for when DDL changes are involved.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:40:50 +00:00
Jeremy Kemper
6c9cfd64ca MySQL: work around ruby-mysql/mysql-ruby inconsistency with mysql.stat. Eliminate usage of mysql.ping because it doesn't guarantee reconnect. Explicitly close and reopen the connection instead. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-03 23:04:34 +00:00
David Heinemeier Hansson
6abda696b5 Added preliminary support for join models [DHH] Added preliminary support for polymorphic associations [DHH] Refactored associations to use reflections to get DRYer, beware, major refactoring -- double check before deploying anything with this (all tests pass, but..)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-03 04:29:55 +00:00
David Heinemeier Hansson
57b7532b91 Work-in progress for providing better join model support and polymorphic associations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 06:03:43 +00:00
Marcel Molina
2e42167058 Allow validate_uniqueness_of to be scoped by more than just one column. Closes #1559.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 04:30:46 +00:00
Jeremy Kemper
3d0e3c9290 Firebird: active? and reconnect! methods for handling stale connections. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 01:19:18 +00:00
Jeremy Kemper
13cfabb2ff Firebird: updated for FireRuby 0.4.0. References #3009.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-02 00:37:32 +00:00
Jeremy Kemper
b44720452c PostgreSQL: active? compatibility with the pure-Ruby driver. Still need to move connect into the adapter since postgres-pr doesn't support #reset. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 21:46:34 +00:00
Jeremy Kemper
75d0623b3d MySQL: active? compatibility with the pure-Ruby driver. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-28 21:00:03 +00:00
Jeremy Kemper
14d50e9da3 Oracle: active? check pings the database rather than testing the last command status. References #428.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 19:50:10 +00:00
Florian Weber
87c3287912 Credit everybody that helped =)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 12:56:22 +00:00
Florian Weber
1f951bbf9f Made test_update_attributes_after_push_without_duplicate_join_table_rows pass with Oracle Adapter. #2888
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3186 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 12:45:33 +00:00
Jeremy Kemper
6c1a356a1a SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find. References #2974.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:15:00 +00:00
Jeremy Kemper
2b28575734 Reloading a model doesn't lose track of its connection. References #2996.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-24 07:01:43 +00:00