Cheah Chu Yeow
2ee5555744
Fix Action caching bug where an action that has a non-cacheable response always renders a nil response body. It now correctly renders the response body.
...
Note that only GET and HTTP 200 responses can be cached.
[#6480 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-03-02 13:11:07 -02:00
Aaron Patterson
648fd60ecf
prefer composition over inheritance with AD::MS
2011-03-01 10:14:09 -08:00
Michael Koziarski
3d907a68d9
Prepend the CSRF filter to make it much more difficult to execute application code before it fires.
2011-02-23 09:00:41 +13:00
Xavier Noria
f41bf6938f
merges docrails
2011-02-18 23:22:15 +01:00
José Valim
28185ebc2e
Remove misleading reference to polymorphic_url.
2011-02-11 05:51:13 -08:00
Gabriel Horner
b3dad5deb9
add some docs for ActionController::Renderers
2011-02-10 00:16:06 -05:00
Michael Koziarski
ae19e4141f
Change the CSRF whitelisting to only apply to get requests
...
Unfortunately the previous method of browser detection and XHR whitelisting is unable to prevent requests issued from some Flash animations and Java applets. To ease the work required to include the CSRF token in ajax requests rails now supports providing the token in a custom http header:
X-CSRF-Token: ...
This fixes CVE-2011-0447
2011-02-08 14:57:08 -08:00
José Valim
6b1018526f
Use Mime::Type references.
2011-02-08 14:14:26 -08:00
Andre Arko
10cab35d3b
Allow page_cache_directory to be set as a Pathname
...
For example, page_cache_directory = Rails.root.join("public/cache")
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-06 17:55:38 -02:00
Xavier Noria
e99e859a04
revises a metal example
2011-02-02 23:27:27 +01:00
Xavier Noria
33643bcf53
copy-edits 2446b13
2011-02-02 23:04:12 +01:00
Xavier Noria
a96a9a4948
Merge branch 'master' of git://github.com/lifo/docrails
2011-02-02 22:04:11 +01:00
Bernerd Schaefer
2446b1307e
Provide documentation for ActionController::Metal
2011-02-02 16:02:28 +01:00
Neeraj Singh
c1145d9281
If I want to set respond_body to nil then it
...
should be nil and not [nil]. If anything other
than nil then wrap it in array
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-25 20:13:56 +01:00
Doug Fales
7927fc2ff7
A patch so that http status codes are still included in logs even during an exception [ #6333 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-01-25 20:12:22 +01:00
Santiago Pastorino
a61e3acef2
html_safe.to_str makes no sense
2011-01-11 18:57:35 -02:00
Timothy N. Tsvetkov
e5b84fd723
ActionController::Base.helpers.sanitize ignores case in protocol
...
[#6044 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-12-30 22:43:43 -02:00
Xavier Noria
69765aad8b
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-29 23:46:03 +01:00
José Valim
6b099975fa
No need to symbolize these.
2010-12-27 09:30:36 +01:00
artemave
ddd85ef9c6
#948 template_inheritance
2010-12-26 22:32:15 -08:00
Akira Matsuda
4e50c6c08a
.erb => .html.erb
2010-12-25 04:58:11 +09:00
Rizwan Reza
9dfa06acb4
Edits to caching/fragments.
2010-12-23 16:29:40 +03:30
Will
aebbbc78cc
Fix respond_with example code so it makes sense
2010-12-19 14:16:54 +11:00
Will
1a6c4c86ea
Correct deprecated AR usage in ActionController::MimeResponds documentation
2010-12-19 14:14:02 +11:00
Piotr Sarnacki
0e5ee9af48
Set proper engine's asset directories when assets are served from engine.
...
When using stylesheet_link_tag(:all) or javascript_include_tag(:all),
assets directories are searched for css or js files. When
config.serve_static_assets is set to true, those files can be
served directly from engine's directories. That's why assets paths
should be set individually for controllers inside engine
if we want to serve static assets with ActionDispatch::Static
2010-12-15 10:01:27 +01:00
Neeraj Singh
0027b65421
Ensure that while caching a page rails takes into
...
account the resolved mime type for the request
[#6110 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-12-09 16:14:57 +01:00
José Valim
8e6d27641c
Clean up asset_host and asset_path.
2010-12-09 13:40:45 +01:00
Xavier Noria
0aa78826e4
makes a pass to the action caching rdoc
2010-12-08 21:20:53 +01:00
Neeraj Singh
3ac844deec
Add to documentation that action caching does
...
handle HTTP_ACCEPT attribute properly and might
provide wrong result. Use params[:format] to
avoid this issue.
2010-12-06 16:38:47 -05:00
Xavier Noria
fd83f9d515
Merge branch 'master' of git://github.com/lifo/docrails
2010-11-27 07:43:59 +01:00
Ryan Bigg
167964149e
Add explicit statement that verify_authenticity_token can be turned off for actions.
2010-11-27 07:57:10 +11:00
Santiago Pastorino
74049b57fb
implicit self here
2010-11-25 21:31:14 -02:00
Josh Kalderimis
a98d9d65ae
move the setting up of the mime collector into the collector on init
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-11-25 21:24:45 -02:00
Neeraj Singh
fa2a5ae033
If a user wants json output then try best to render json output. In such cases prefer kind_of(String) over respond_to?(to_str)
...
[#5841 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-24 22:08:36 +01:00
Josh Kalderimis
2fe43b694f
:subdomain, :domain and :tld_length options can now be used in url_for, allowing for easy manipulation of the host during link generation.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-23 09:54:42 +01:00
Santiago Pastorino
c937ddb5ce
Remove unused constant
2010-11-22 19:00:05 -02:00
Santiago Pastorino
6e559168dc
There's no need for ternary op here
2010-11-22 18:47:47 -02:00
Santiago Pastorino
559c4292bc
Remove unneeded metaprogramming and method generation in favor of direct definition
2010-11-22 16:02:13 -02:00
Josh Kalderimis
d7db6a8873
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-20 19:40:29 +01:00
Santiago Pastorino
4f3b5b8ec1
Fix indentation
2010-11-20 02:46:55 -02:00
Piotr Sarnacki
250fb3f6c2
Add config.action_controller.include_all_helpers, by default it is set to true.
...
In older rails versions there was a way to use only helpers from
helper file corresponding to current controller and you could also
include all helpers by saying 'helper :all' in controller. This config
allows to return to older behavior by setting it to false.
2010-11-18 00:20:57 +01:00
Santiago Pastorino
46332e458c
Move @assigns from the controller to the test itself
2010-11-06 21:15:59 -02:00
Santiago Pastorino
2382667955
Fix problems trying to functional test AC::Metal controllers
...
[#5393 state:committed]
2010-11-06 21:15:03 -02:00
Chris Eppstein
b1667c7c2c
Correctly handle the case of an API response that returns a hash by treating a single hash argument as the resource instead of as options.
2010-11-06 06:56:36 +08:00
Krekoten' Marjan
608bf7b72c
AC::Caching DRYup
...
Remove ActionController::Caching::Pages#caching_allowed
because it duplicates ActionController::Caching#caching_allowed?
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-10-18 17:30:28 -02:00
Andrew White
f7573175de
Reset assert_template instance variables between requests [ #5832 state:resolved]
2010-10-18 09:57:51 +01:00
Neeraj Singh
ea14396c45
replace if ! with unless
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-10-17 12:26:32 -02:00
Xavier Noria
13f7f89bda
Merge branch 'master' of git://github.com/lifo/docrails
2010-10-14 23:15:23 +02:00
Krekoten' Marjan
0744d36f47
Fix small typo in documentation
2010-10-12 22:55:19 +03:00
Szymon Nowak
0d33332571
Return a valid empty JSON on successful PUT and DELETE requests. [ #5199 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-12 00:56:07 +02:00