Commit Graph

2634 Commits

Author SHA1 Message Date
Jeremy Kemper
b17eb65d00 Move fixtures settings from AR::TestCase to railties test_help 2008-11-12 11:33:09 -08:00
Jeremy Kemper
5d2b5ba23e Merge branch 'master' into testing 2008-11-11 10:22:09 -08:00
Frederick Cheung
78a18392e1 Remove redundant uniq 2008-11-11 11:22:13 +01:00
Joshua Peek
335a315240 Add simple case when DB calculations returns 0 instead of 0.0 [#1346 state:resolved] 2008-11-10 14:16:43 -06:00
Jeremy Kemper
1df0a07f06 lazy-initialize already loaded fixtures map 2008-11-08 22:49:00 -05:00
Jeremy Kemper
ace9e533dc Merge branch 'master' into testing 2008-11-08 18:58:29 -05:00
Jeremy Kemper
dd77733f2f Timeout the connection pool monitor on ruby 1.8 only 2008-11-08 00:27:18 -05:00
Jeremy Kemper
661980692b Merge branch 'master' into testing 2008-11-07 21:54:29 -05:00
Ken Collins
a7f920f674 If average value from DB is 0, make sure to convert it to a 0.0 float before calling #to_d on it [#1346 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-07 20:39:06 -06:00
Jeremy Kemper
0994d11f26 Merge branch 'master' into testing 2008-11-07 19:55:29 -05:00
Pratik Naik
d20955f889 Don't leave open dangling connections in development mode. [#1335 state:resolved] 2008-11-08 04:04:32 +05:30
Nick Sieger
529c271699 Simplify dispatcher callbacks to eliminate unnecessary stale thread purging. [Nick Sieger, Pratik Naik]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-11-08 03:49:54 +05:30
Jeremy Kemper
1d803e5189 Update AR tests 2008-11-07 16:22:56 -05:00
Jeremy Kemper
15c0774920 undef abstract methods instead of raising NotImplementedError. Still need the definitions for rdoc though. 2008-11-07 16:22:28 -05:00
Jeremy Kemper
b0ee1bdf26 Remove fixtures from Test::Unit::TestCase. Mix in AR::TestFixtures instead. 2008-11-07 15:40:56 -05:00
Tekin Suleyman
32a5cfcd7f Added tests for HABTM associations with counter_sql
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1102 state:committed]
2008-11-07 07:50:30 +00:00
Tekin Suleyman
26978e3ce8 Added :counter_sql as a valid key for habtm associations
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-07 07:50:23 +00:00
Michael Koziarski
9d4337ea13 Revert commit which breaks all the tests.
This reverts commit 8adb79b9b5.

Conflicts:

	activerecord/CHANGELOG
2008-11-07 07:31:59 +00:00
Joshua Peek
77697e0335 Fix memory leak issue in ActiveRecord scoped_methods 2008-11-06 17:10:16 -06:00
David Heinemeier Hansson
a358d87e16 Fixed the sanitize helper to avoid double escaping already properly escaped entities [#683 state:committed] 2008-11-06 13:02:32 +01:00
David Heinemeier Hansson
077773257b Stop logging SHOW FIELDS and SET SQL_AUTO_IS_NULL=0 for the MysqlAdapter as they only clutter up the log and offer no value [DHH] 2008-11-06 12:59:17 +01:00
Pratik Naik
0832bc63f4 Make sure ActiveRecord::Base.connected? doesn't raise an exception for defined connections 2008-11-06 01:29:09 +05:30
Wes Oldenbeuving
32089cbcc9 Ensure ActiveRecord::ConnectionPool.connected? handles undefined connections. [#936 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-11-06 00:24:09 +05:30
Hongli Lai (Phusion)
fb2325e358 Reimplement Jeremy's PostgreSQL automatic transaction state introspection code.
- Fixed compatibility with the old 'postgres' driver which doesn't support
  transaction state introspection.
- Added unit tests for it.
2008-11-03 20:56:28 +01:00
Hongli Lai (Phusion)
e916aa7ea1 Rename ActiveRecord::Base#transaction's :force option to :nest. Improve documentation for nested transactions. 2008-11-03 20:56:21 +01:00
Hongli Lai (Phusion)
885c11b8f9 Make SQLite3 pass the unit tests for savepoints. 2008-11-03 20:56:14 +01:00
Hongli Lai (Phusion)
e981eaaf34 Fix a stale typo in the PostgreSQL adapter. Fix a stale mock expection in transaction_test. 2008-11-03 20:56:07 +01:00
Hongli Lai (Phusion)
e383835e73 Revert "PostgreSQL: introduce transaction_active? rather than tracking activity ourselves"
This commit conflicts with savepoint support.

This reverts commit 045713ee24.

Conflicts:

	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2008-11-03 20:56:00 +01:00
Hongli Lai (Phusion)
f48703e8c6 Fix the final MySQL unit test failure that's related to savepoint support. 2008-11-03 20:55:53 +01:00
Hongli Lai (Phusion)
47b594cc5a Improve documentation for DatabaseStatements#transactions and AbstractAdapter#transactional_fixtures, especially with regard to support for nested transactions. 2008-11-03 20:55:47 +01:00
Jonathan Viney
3f4a8b6d0a Fix assert_queries failures by ignoring savepoint sql. 2008-11-03 20:55:40 +01:00
Jonathan Viney
b1b204abbb Fix what looks like a Mysql bug with transactions, savepoints, and create table. 2008-11-03 20:55:33 +01:00
Jonathan Viney
b3420f5a2e Implement savepoints. 2008-11-03 20:55:26 +01:00
Pratik Naik
dc37fdc480 Merge docrails. Remove unnecessary files. 2008-11-02 18:13:54 +05:30
Luca Guidi
5229fc4cc0 Make sure habtm use class variable to list association valid keys
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1310 state:committed]
2008-11-01 15:04:08 +01:00
Joshua Peek
4df5e1ae8f It is not necessary to store QueryCache in a thread local since the cache is local to the connection object which is managed by the connection pool 2008-10-30 16:27:13 -05:00
Joshua Peek
0c84b6f9ed Use database name in query cache thread local key [#1283 state:resolved] 2008-10-30 15:48:03 -05:00
Jordi Bunster
a9e8168432 Ensure indices don't flip order in schema.rb [#1266 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-10-30 13:03:42 +01:00
David Heinemeier Hansson
8f0f078637 Make #destroy write 1 line into log (instead of 3) (Dmitry Sokurenko) [#689 status:committed] 2008-10-29 10:53:33 +01:00
David Heinemeier Hansson
c94ba8150a Fixed that serialized strings should never be type-casted (i.e. turning "Yes" to a boolean)(Andreas Korth) [#857 state:committed] 2008-10-27 17:16:45 +01:00
Michael Koziarski
9e2bb2caff Remove reference to fformat to restore support for postgres gem. 2008-10-26 20:04:09 +01:00
Adam Majer
932dffc559 Fix binary data corruption bug in PostgreSQL adaptor
1. Move the binary escape/unescape from column to the driver - we should store binary data AR just like most other adaptors
  2. check to make sure we only unescape bytea data
     PGresult.ftype( column ) == 17
  that is passed to us in escaped format
     PGresult.fformat( column ) == 0

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1063 state:committed]
2008-10-25 12:54:48 +02:00
Mike Gunderloy
5c97d4ff29 "raise NoMethodError" raises NoMethodError. Raise it with NoMethodError.new instead.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-25 14:52:44 +05:30
Ken Miller
8a77c4abfa Fixed issue where block is not called on the very first invocation of a find_or_create_by_ automatic finder.
[#1224 state:committed]
2008-10-24 21:35:05 +02:00
David Heinemeier Hansson
d224e6ccb1 Update CHANGELOGs with the last few fixes, set date for today 2008-10-24 13:08:47 +02:00
Jeremy Kemper
838cb1aa50 Skip collection ids reader optimization if using :finder_sql 2008-10-23 18:53:44 -07:00
David Heinemeier Hansson
5366e61458 Proper update call for gem server 2008-10-23 20:29:25 +02:00
David Heinemeier Hansson
eec6e0cbbd Push to new gem server 2008-10-23 20:18:11 +02:00
David Heinemeier Hansson
57c31a380e Prepare for Rails 2.2.0 [RC1] 2008-10-23 20:14:20 +02:00
Pratik Naik
a03e2b356c Merge with docrails. Also add a rake task to generate guides in your rails application :
rake doc:guides

The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
2008-10-21 18:33:40 +01:00