Commit Graph

7940 Commits

Author SHA1 Message Date
Michael Koziarski
6e2851d426 Remove the Version check as it's not always available. 2008-09-09 10:38:07 +02:00
Jeremy Kemper
1b94d5dc65 Fix indentation mismatch 2008-09-08 18:10:23 -07:00
Jeremy Kemper
dc0aed1151 Don't shadow arg with block var 2008-09-08 18:08:48 -07:00
Jeremy Kemper
621f48edb2 BigDecimal to_s and yaml housekeeping 2008-09-08 18:06:58 -07:00
Jeremy Kemper
4f6875296f Revert "Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment""
This reverts commit 41efd73887.
2008-09-08 09:45:26 -07:00
Matt Jones
7e6cda15f8 Ensure routing optimizations are cleared when new routes are added [#981 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-09-07 10:21:34 -05:00
Jeremy Kemper
41efd73887 Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment"
This reverts commit 108db00aa9.
2008-09-06 21:01:45 -07:00
Jeremy Kemper
15b1b2b778 Ruby 1.9 compat: use method_defined? instead of instance_methods.include? Don't encourage args abuse by flattening. 2008-09-06 18:45:52 -07:00
David Heinemeier Hansson
227ee2ecb4 Use a more sensible resolution on the new millisecond benchmarks 2008-09-05 14:58:34 +02:00
David Heinemeier Hansson
de0e7507de Changed all benchmarking reports to be in milliseconds 2008-09-05 14:22:57 +02:00
David Heinemeier Hansson
cf0467c642 Use copy instead of export for release 2008-09-05 14:22:56 +02:00
Jeremy Kemper
1156bbc06c Merge branch 'master' of git@github.com:rails/rails 2008-09-04 17:20:24 +02:00
Jeremy Kemper
cd498e2588 Rescue spurious failures in case dummy postgresql user or schema already exists 2008-09-04 17:20:07 +02:00
Michael Koziarski
ca5ffd10b9 Handle connection timeouts with a slightly nicer error message. 2008-09-04 17:02:04 +02:00
Jeremy Kemper
17628ecfce Deprecate %d and %s in message interpolation, but only in the bundled i18n lib. 2008-09-04 16:46:12 +02:00
Nick Sieger
0d9e238cc9 Remove flawed execute("ROLLBACK") approach; #reset! defaults to nothing
Will need community help to fill out what #reset! should do for each adapter

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-04 15:45:00 +02:00
Nick Sieger
a3f12f575d Default connection allow_concurrency to false (for PostgreSQL)
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-04 15:44:05 +02:00
Michael Koziarski
2c62baf4bf Handle the case where there is no ivar set.
This happens on jruby due to a bug, but also on historically marshalled data.
2008-09-04 15:09:30 +02:00
Nick Sieger
7ba2872615 Deprecate verification_timeout and verify before reset
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-09-04 14:36:09 +02:00
Jeremy Kemper
f54be2cb31 Fix transaction exception test 2008-09-04 13:24:55 +02:00
Jeremy Kemper
039d78a7d8 still need to track whether we're the toplevel transaction 2008-09-04 13:17:00 +02:00
Jeremy Kemper
045713ee24 PostgreSQL: introduce transaction_active? rather than tracking activity ourselves 2008-09-04 12:17:56 +02:00
Tarmo Tänav
671bbd962e Don't run 32bit dependant assertions in 64bit environments
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-09-04 10:11:06 +02:00
Pratik Naik
6ef35461dc Merge docrails 2008-09-03 17:58:47 +01:00
Adam Keys
10fe6a6d89 Add each_with_object from 1.9 for a more convenient alternative to inject.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#962 state:committed]
2008-09-03 16:21:53 +02:00
Nigel Ramsay
b36d000975 Inline help text was incorrectly telling user to uncomment line to use default local time. User should comment the line to use default local time.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#960 state:committed]
2008-09-03 09:04:42 +02:00
Clemens Kofler
d3ccfe414d Whitespace.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:55 +02:00
Clemens Kofler
288e947ae1 Some performance goodness for inheritable attributes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
4d092ba208 Some performance goodness for AR.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
a377c9853c Some performance goodness for AM Validations.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
b42f53ca1f Some performance goodness for AM StateMatchine.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
948ed34600 Some performance goodness for routing.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:23 +02:00
Clemens Kofler
ba3ecf53b4 Some performance goodness for AR associations.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Clemens Kofler
1646e8c364 More symbols for send and respond_to?.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Clemens Kofler
a978701f86 More symbols for send and respond_to?.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Clemens Kofler
abebdf52a3 Use symbols for send and respond_to?.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Clemens Kofler
2e240f0eac Removed unnecessary Symbol#to_proc from Asset Tag Helper.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-03 00:55:22 +02:00
Jonathan del Strother
6cfb70023a Don't set Content-Length on 304 responses
Commit 8aad8c claimed to do this, but it checks for the 304 status too early, before handle_conditional_get! has overridden it.

[#958 state:resolved]

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-02 22:57:40 +02:00
Jeremy Kemper
6f932b4790 Database connections are now pooled, one pool per #establish_connection call.
Pools start out empty and grow as necessary to a maximum size (default is 5,
configure size with key 'pool' in your database configuration). If no
connections are available, a thread will wait up to a 'wait_timeout' time
(default is 5 seconds).

Connections are verified and reset when checked out from the pool (usually
upon first access to ActiveRecord::Base.connection), and returned back to the
pool after each request.

If you would like to use connection pools outside of ActionPack, there is an
ActiveRecord::Base.connection_pool method that gives you access to the pool,
and you can manually checkout/checkin connections, or supply a block to
ActiveRecord::Base.connection_pool.with_connection which takes care of the
checkout/checkin for you.

[#936 state:resolved]
2008-09-02 18:32:54 +02:00
Michael Koziarski
ebfa43c423 Merge rexml-expansion-fix gem into activesupport.
Addresses the security issue documented at:
* http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
2008-09-02 16:22:20 +02:00
Iain Hecker
76797b4439 translates when a message symbol has been set on builtin validations
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-31 13:24:08 -07:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Pratik Naik
e9a8e0053b Add layout functionality to mailers.
Mailer layouts behaves just like controller layouts, except layout names need to
have '_mailer' postfix for them to be automatically picked up.
2008-08-31 19:17:42 +01:00
Luke Melia
7ce03db778 Fixes optimised named routes generating question mark followed by nothing when provided an empty hash as the last argument.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#481 state:committed]
2008-08-31 19:42:01 +02:00
Joshua Peek
086c3520c4 Moved layout exemption logic into the view 2008-08-31 11:34:46 -05:00
Joshua Peek
8eec694598 Prefix ActionView::Base private methods with an underscore 2008-08-31 10:50:43 -05:00
Pratik Naik
56c2b02f59 Fix AM tests and add tests for rendering logging 2008-08-31 16:29:21 +01:00
Pratik Naik
cdda7defa0 Add lost log messages about template rendering 2008-08-31 15:41:02 +01:00
Pratik Naik
a13d335461 Move layout rendering logic to ActionView::Base 2008-08-31 15:23:45 +01:00
Jeremy Kemper
c50223b76f Fix tests that assumed implicit order by id 2008-08-30 22:47:28 -07:00