Jeffrey Hardy
1a18227261
Fix that HTML::Node.parse would blow up on unclosed CDATA sections.
...
If an unclosed CDATA section is encountered and parsing is strict, an
exception will be raised. Otherwise, we consider the remainder of the line to
be the section contents. This is consistent with HTML::Tokenizer#scan_tag.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:12 -07:00
David Heinemeier Hansson
18542c9e00
Dont try to auto-set the etag based on the body if any freshness headers have already been set [DHH/José Valim]
2008-10-21 16:58:12 +02:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
David Heinemeier Hansson
6fae0a0ec0
No use case handy for justifying fresh? any more
2008-10-21 10:20:30 +02:00
David Heinemeier Hansson
448e7e7c04
Let fresh_when actually do the head(:not_modified). Cleaner and we get the filter halting for free then.
2008-10-21 02:54:55 +02:00
David Heinemeier Hansson
68d84e2593
Merge branch 'master' of git@github.com:rails/rails
2008-10-21 02:30:57 +02:00
David Heinemeier Hansson
9acb88e666
Added stale?/fresh? and fresh_when methods to provide a layer of abstraction above request.fresh? and friends [DHH]
2008-10-21 02:30:13 +02:00
Tim Harper
fcb45e5ec3
Ensure ActionView::Helpers::AssetTagHelper::AssetTag::Cache is cleared before loading so changes to asset files are picked up by the broswer [ #1233 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-10-20 13:21:59 -05:00
Michael Koziarski
ba80ff74a9
Sanitize the URLs passed to redirect_to to prevent a potential response splitting attack.
...
CGI.rb and mongrel don't do any sanitization of the contents of HTTP headers, so care needs to be taken.
2008-10-19 15:24:18 +02:00
Eloy Duran
b47c76b1df
Make sure named routes with parameters can be used in tests before a request has been done. [ #1208 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-13 18:38:48 +02:00
Tom Stuart
e28ad77bba
Allow use of :path_prefix and :name_prefix outside of namespaced routes. [ #1188 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-10-08 14:56:52 +01:00
Michael Koziarski
aec391621b
Make sure last_modified! works with <= rather than just equality.
2008-10-07 21:09:07 +02:00
Pratik Naik
a2932784bb
Merge docrails
2008-10-05 22:16:26 +01:00
Pratik Naik
259a7a844b
Add tests for ActiveSupport::Rescuable. Use ActiveSupport::Rescuable in ActionController::Base.
2008-10-04 22:13:50 +01:00
Pratik Naik
5e3517ea7b
Ensure rescue_from handlers are respected inside tests. [ #835 state:resolved]
...
Note : If you're not using rescue_from, you should overrider rescue_action_without_handler() method
and not rescue_action(). Afterwards, you can set request.remote_addr to a non "0.0.0.0" value for testing the
overridden behavior.
2008-10-04 18:43:46 +01:00
Aliaksey Kandratsenka
b437a7d34e
Return processing lock to dispatcher, the finer grained lock was incompatible with the reloading in development mode.
...
This commit also adds ActionController::Dispatcher#dispatch_unlocking -- non-locking version of dispatch.
It's named anologously to POSIX {getc,getchar,...}_unlocked functions.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1170 state:committed]
2008-10-04 18:25:08 +02:00
Aliaksey Kandratsenka
6080b73b1c
call clear_active_connections! in :after_dispatch to give pooled connections back
...
This fixes connection pool exhaustion for web servers which create new thread per connection (e.g. Webrick).
integration.rb changes are required to keep test transaction active for several requests.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1171 state:committed]
2008-10-04 17:48:13 +02:00
David Masover
e69b506abd
Call controller_path instance method so it can be easily overridden [ #1141 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-09-30 12:07:21 -05:00
Michael Koziarski
0eefa7058a
Fix etag! and last_modified! to work as advertised.
...
Add tests too.
2008-09-30 17:00:38 +02:00
Michael Koziarski
0b46503254
Remove unneeded interning.
2008-09-30 11:34:05 +02:00
Michael Koziarski
025736de8e
Use ActiveSupport::SecureRandom instead of the strange fallback code.
2008-09-24 16:24:02 +02:00
Pelle Braendgaard
7ecb9689b0
Added support for http_only cookies in cookie_store Added unit tests for secure and http_only cookies in cookie_store
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1046 state:committed]
2008-09-17 13:20:16 +02:00
Pratik Naik
a17027d13a
Merge docrails
2008-09-13 20:28:01 +01:00
Sven Fuchs
a18ed6d563
Added ActionController::Translation module delegating to I18n #translate/#t and #localize/#l [status:committed #1008 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-10 00:39:54 -05:00
David Heinemeier Hansson
c5b65b4905
Only separate loggings with a comma when there are actually two statements
2008-09-09 22:42:49 -05:00
David Heinemeier Hansson
6228220c9b
Revert "Revert "Add layout functionality to mailers.""
...
This reverts commit 36c6aa01ee .
2008-09-09 17:25:09 -05:00
David Heinemeier Hansson
36c6aa01ee
Revert "Add layout functionality to mailers."
...
This reverts commit e9a8e0053b .
2008-09-09 17:20:55 -05:00
Jeremy Kemper
dc0411fad7
Check for uninitialized instance variables
2008-09-08 19:57:32 -07:00
Jeremy Kemper
fd71a1a354
Remove recognized_optimized method before redefining it
2008-09-08 19:42:20 -07:00
Jeremy Kemper
3c658512a1
Use defined? check since @view_paths may be uninitialized
2008-09-08 19:41:57 -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
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
Pratik Naik
6ef35461dc
Merge docrails
2008-09-03 17:58:47 +01: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
948ed34600
Some performance goodness for routing.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +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
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
Pratik Naik
a59a3db1f3
Move copying ivar logic from ActionController::Base to ActionView::Base
2008-08-31 03:48:09 +01:00
Pratik Naik
cb25c4e584
Remove unused use_full_path argument
2008-08-31 00:18:10 +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