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
Nathaniel Bibler
efa6620a2a
Added optional rake doc:app TITLE environment parameter
...
[#939 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 21:04:04 -07:00
Rasik Pandey
16b9a554db
Format related patches to support serializing data out in the correct format with correct http request headers per http method type [ #450 state:resolved]
...
Signed-off-by: Tarmo Tänav <tarmo@itech.ee >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 18:45:39 -07:00
miloops
11eb29f60a
Make assert_select_rjs code more readable, make use of unused constants and use more simple Regexps.
...
[#540 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 17:52:26 -07:00
Tarmo Tänav
6450d6ca76
Added button_to_remote helper
...
Ticket originally from http://dev.rubyonrails.org/ticket/3641
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 16:22:01 -07:00
Jeremy Kemper
5a6e20b607
Fix test to not assume which thread finishes first
2008-08-29 15:59:56 -07:00
Hongli Lai (Phusion)
204a8cce88
Move some core extension methods into a module under the ActiveSupport::CoreExtensions namespace, instead of extending core classes directly. This is more friendly for API reference generators.
...
[#915 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-29 15:15:40 -07:00
Tom Stuart
7f179f8540
Make NamedScope#size behave identically to AssociationCollection#size. [ #933 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-29 22:18:49 +01:00
Joshua Peek
c0361344d9
1.9: methods need to be coerced into strings
2008-08-29 15:43:07 -05:00
James Mead
3cf773b187
ActionMailer should respond_to? to methods handled by method_missing [ #700 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-29 15:09:47 -05:00
Michael Koziarski
99492bad88
Use a set for the named scope methods not a big regexp.
2008-08-29 21:12:37 +02:00
Nick Sieger
300754509b
Minor tweak to retrieve_connection_pool -- recurse instead of loop
2008-08-29 14:12:13 -05:00
Nick Sieger
113cc4e1c4
Remove some synchronization that's probably overkill, assuming one doesn't establish connections frequently
2008-08-29 14:12:13 -05:00
Nick Sieger
c1b949869c
Remove call to active_record.allow_concurrency since it's deprecated
2008-08-29 14:12:13 -05:00
Nick Sieger
8e5e02bdad
Collapse connection pool class hierarchy; YAGNI.
...
- Add connection checkin and checkout callbacks to adapter to allow
adapter-specific customization of behavior (e.g., JRuby w/ JNDI)
2008-08-29 14:12:12 -05:00
Nick Sieger
d07a6b1a4a
Make clear_active_connections! also return stale connections back to the pool
...
- also clean up some cruft remaining from per-thread connection cache
2008-08-29 14:12:12 -05:00
Nick Sieger
212134dce1
Remove CachedConnectionPerThread per-thread pooling mechanism in favor of a fixed pool with default maximum of 5 connections
2008-08-29 14:12:12 -05:00
Nick Sieger
ca6d71753f
Deprecate allow_concurrency and make it have no effect
2008-08-29 14:12:12 -05:00
Nick Sieger
a96b7d4c33
Add connection reset and verification upon each connection checkout
2008-08-29 14:12:12 -05:00
Nick Sieger
d7d2d73d88
Fix typo: was using brackets instead of parens. Must need more sleep.
2008-08-29 14:12:11 -05:00