Pratik Naik
c70b993a9e
Merge docrails.
2008-11-14 17:47:21 +05:30
Tom Stuart
2ecec6052f
Make inheritance of map.resources :only/:except options behave more predictably
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-14 12:26:43 +01:00
hiroshi
94d6716324
Make polymorphic_url compact given array [ #1317 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-11-14 12:07:52 +01:00
Tom Stuart
4c09210244
Fix map.resources to always generate named routes if they're needed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 17:49:09 +01:00
Michael Koziarski
f1ad8b48aa
Instead of overriding html_types, base the verification on browser_generated_types.
...
Also Deprecate the old unverifiable types.
[#1145 state:committed]
2008-11-13 11:23:34 +01:00
rick
00c46b5eeb
fix two MimeType failing test cases
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:34 +01:00
Jeff Cohen
fbbcd6f29a
Changed request forgery protection to only worry about HTML-formatted content requests.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-13 11:23:21 +01:00
Tom Stuart
44a3009ff0
Add :only/:except options to map.resources
...
This allows people with huge numbers of resource routes to cut down on the memory consumption caused by the generated code.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1215 state:committed]
2008-11-12 12:57:58 +01:00
Jeremy Kemper
278b6cd952
Eliminate excess Regexp creation due to capture counting
2008-11-10 22:21:09 -08:00
Jeremy Kemper
5db9f9b3ad
Pare down object creation during route building
2008-11-10 22:21:09 -08:00
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
Aliaksey Kandratsenka
099f10679e
Don't eval recognize_optimized use __FILE__ and __LINE__ in the optimised recognition code.
...
It produces meaningless line numbers. This also easily produces line numbers greater than recognition_optimization.rb have, which causes rcov to trash memory outside of it's coverage counting arrays.
[#1319 state:committed]
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-06 19:52:44 +00:00
Michael Koziarski
af5b304a40
Fix stupid typo
2008-11-06 18:52:02 +00: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
55707da1a1
Dont bother logging the parameters hash if there are no parameters
2008-11-06 09:59:11 +01:00
David Heinemeier Hansson
a909eecbbd
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:14:29 +01:00
David Heinemeier Hansson
b29f95ed9a
Dont log the _method attribute either. Its already available in the header
2008-11-04 18:12:32 +01:00
Pratik Naik
18bf7b421d
Remove unused debug_routes
2008-11-02 23:23:19 +05:30
Pratik Naik
934f98e4cf
Dont dup params twice when filter_parameters is present
2008-11-02 23:19:44 +05:30
Pratik Naik
be1beb1a2d
Dont document internals
2008-11-02 18:36:14 +05:30
Michael Koziarski
8a53e258e5
Backwards compatibility fixes for relative_url_root
...
* Make the old deprecated relative_url_root still set the value as it's still used by mongrel
* Set the default from the ENV value when the file is required, not at runtime.
2008-11-02 13:12:48 +01:00
Pratik Naik
b047929c14
Merge with docrails
2008-11-02 04:02:40 +05:30
Tom Lea
5a02f0bccf
Cleaned up route optimisation guard condition generation code as it was getting a little messy.
...
Add additional condition to handle the case where default_url_options is only defined in the controller, not the view.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-11-01 19:06:25 +01:00
David Heinemeier Hansson
62ffc6e4db
Simplified the logging format for parameters (don't include controller, action, and format as duplicates) [DHH]
2008-11-01 15:46:30 +01:00
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
David Heinemeier Hansson
5110a8e05b
Remove the logging of the Session ID when the session store is CookieStore [DHH]
2008-11-01 12:16:15 +01:00
David Heinemeier Hansson
aea7e8c2f3
Accidently nixed a doc header
2008-11-01 12:05:55 +01:00
David Heinemeier Hansson
cbeac93310
Added render :js for people who want to render inline JavaScript replies without using RJS [DHH]
2008-11-01 12:03:49 +01:00
Joshua Peek
2092687bcb
Ensure content type gets reset after render_to_string [ #1182 state:resolved]
2008-10-30 15:26:29 -05:00
Seth Fitzsimmons
47b4fa4a62
Fixed regex in redirect_to to fully support URI schemes [ #1247 state:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-10-30 21:07:50 +01:00
David Heinemeier Hansson
4dbfe18b37
Proper API for reloading translations
2008-10-29 10:51:56 +01:00
Joshua Peek
ac50ee0edf
Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object.
2008-10-28 11:06:08 -05:00
Joshua Peek
0f651aec4e
Thread Safety: Ensure recognize_optimized is immediately written instead of lazily
2008-10-27 12:34:54 -05:00
Jeffrey Hardy
3bcadc9290
Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-10-23 19:16:26 -07:00
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