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
Pratik Naik
a59a3db1f3
Move copying ivar logic from ActionController::Base to ActionView::Base
2008-08-31 03:48:09 +01:00
miloops
6183e55f71
Use reflection primary_key instead of id for when selecting association ids.
...
[#906 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 17:39:30 -07:00
miloops
367a55e1b8
Allow prototype functions to receive position parameter as a symbol.
...
[#887 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 16:35:25 -07:00
Pratik Naik
cb25c4e584
Remove unused use_full_path argument
2008-08-31 00:18:10 +01:00
Jeremy Kemper
f7d9e09eee
Merge branch 'master' of git@github.com:rails/rails
2008-08-30 15:49:56 -07:00
miloops
b163d83b8b
Performance: Better query for ASSOCIATION_ids. Select only ids if the association hasn't been loaded.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 15:24:09 -07:00
Pratik Naik
4fb75392aa
Add test to make sure RJS block inside controller is executed in view context
2008-08-30 21:47:35 +01:00
Pratik Naik
e12abb6e8a
Dont pass controller partial layout option to view
2008-08-30 20:18:54 +01:00
Pratik Naik
afea4c9b0e
Remove double layout check
2008-08-30 19:35:29 +01:00
Pratik Naik
83c6ba1889
Add support for shallow nesting of routes. [ #838 state:resolved]
...
Adds :shallow option to resource route definition. If true, paths for nested
resources which reference a specific member (ie. those with an :id parameter)
will not use the parent path prefix or name prefix.
Example :
map.resources :users, :shallow => true do |user|
user.resources :posts
end
* GET /users/1/posts (maps to PostsController#index action as usual)
named route "user_posts" is added as usual.
* GET /posts/2 (maps to PostsController#show action as if it were not nested)
Additionally, named route "post" is added too.
2008-08-30 15:20:20 +01:00
Sven Fuchs
be4ae1f526
I18n: applied Luca Guidi's patch for better #interpolate performance
...
[#943 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-30 02:02:33 -07:00