Commit Graph

2948 Commits

Author SHA1 Message Date
Santiago Pastorino
7c79996c67 Rack body respond to each and not to join
This fixes undef `to_str' for Rack::Chunked::Body when using
caches_action + streaming on an action

Closes #5027
2012-02-14 21:53:38 -02:00
Ryan McGeary
391e6a47db Fixed force_ssl redirects to include original query params
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.
2012-02-06 17:47:17 -05:00
José Valim
2bf2055f7a Clean up a bit default_response handling and cache format negotiation. 2012-02-04 16:01:01 +01:00
Prem Sichanugrist
567ac65b42 Fix override API response bug in respond_with
Default responder was only using the given respond block when user
requested for HTML format, or JSON/XML format with valid resource. This
fix the responder so that it will use the given block regardless of the
validity of the resource. Note that in this case you'll have to check
for object's validity by yourself in the controller.

Fixes #4796
2012-02-03 14:26:34 -05:00
Damian Le Nouaille
fd9d394cc3 example bracket error 2012-01-26 00:01:39 +05:30
José Valim
08d6eb6824 Do not deprecate performed? 2012-01-19 19:45:22 +01:00
Carlos Antonio da Silva
786a0b7475 Remove duplicated constant definition
ActionController::ActionControllerError is already defined in
action_controller/metal/exceptions.
2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
e5e87041ce Deprecate AC::UnknownError and AC::DoubleRenderError
Use the constants AbstractController::ActionNotFound and
AbstractController::DoubleRenderError respectively instead.
2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
57be2cfa1e Deprecate default_charset= at controller level 2012-01-17 18:07:08 -02:00
Carlos Antonio da Silva
20baeece91 Add some deprecations for logic being removed in 4.0 2012-01-17 18:07:08 -02:00
codesnik
96d4da1719 Made an example a little more realistic 2012-01-11 20:24:17 +05:30
Santiago Pastorino
3375a093e9 Rails initialization with initialize_on_precompile = false should set assets_dir 2012-01-10 16:34:13 -02:00
Piotr Sarnacki
d65b766426 Fix http digest authentication with trailing '/' or '?' (fixes #4038 and #3228) 2012-01-10 04:42:46 +01:00
Sergey Nartimov
4f440a3833 fix base64 requires 2012-01-03 01:18:34 +03:00
Sergey Nartimov
5f09414f85 deprecate ActiveSupport::Base64
extend and define ::Base64 if needed
2012-01-03 00:57:03 +03:00
José Valim
c4ef3d34ee Remove unecessary config_accessors. 2011-12-24 10:52:45 +01:00
José Valim
ba868929d3 Provide a class optin for page_cache_compression. 2011-12-24 10:52:45 +01:00
Andrey A.I. Sitnik
754823dd66 Gzip files on page caching
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-24 10:52:45 +01:00
Vijay Dev
bd84b2bb5d Merge branch 'master' of github.com:lifo/docrails 2011-12-16 23:34:00 +05:30
José Valim
654df86b7b Show detailed exceptions no longer returns true if the request is local in production. 2011-12-16 10:45:59 +01:00
José Valim
26e7400cc5 Fix diagnostics page for routing errors. 2011-12-15 19:43:49 +01:00
Nick Howard
dcd59f2d9f escape assigns[:person], assigns[person] etc in actioncontroller testcase 2011-12-14 15:38:15 -07:00
Aaron Patterson
676092f761 logger adds a newline for us 2011-12-12 16:02:59 -08:00
Piotrek Okoński
5266eb9f61 Default relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"]. Fixes #3365 2011-12-12 17:11:07 +01:00
José Valim
ab30570b69 Fix extend -> include. 2011-12-09 21:42:18 +01:00
David Heinemeier Hansson
22a6079a20 Make ActiveSupport::Benchmarkable a default module for ActionController::Base, so the #benchmark method is once again available in the controller context like it used to be *DHH* 2011-12-09 18:17:57 +01:00
Jean-Francois Turcot
d5526218e4 ParamsWrapper only wrap the accessible attributes when they were set 2011-12-07 22:50:01 -05:00
Prem Sichanugrist
0460b3a469 Fix bug in assert_template when using only :layout option
Currently if you're do this:

    assert_template :layout => "foo"

Regardless of what layout you were using, the test will always pass. This was broken since the introduction of :layout option in [d9375f3f].

We have a lot of test cases in actionpack/test/controller/layout_test.rb that use this feature. This will make sure that those test cases are not true negative.
2011-12-06 21:15:27 -05:00
Thomas von Deyen
0da31a1839 Allowing string as url argument for expire_action 2011-12-06 13:05:15 +01:00
lest
1f0e21ce30 use classify in ParamsWrapper to derive model name from controller name 2011-12-05 19:15:36 +03:00
Overbryd
9fb5ee8beb Minor enhancement by not unnecessarely escaping forward slashing within a curly regexp and by mentoining the protocol relative scheme in the internal comment 2011-12-05 11:48:05 +01:00
Overbryd
e31c4ace97 Fix for redirect_to to respect urls with a network path reference like "//asset.host.com/resources/1235" see issue #3856 2011-12-05 11:19:48 +01:00
José Valim
07f90f6bec Merge branch 'exceptions' with the following features:
* A Railtie API for registering new exceptions and their respective status code (check Active Record railtie for an example)

* Extraction of ShowExceptions middleware logging and debugging features into a middleware called DebugExceptions

Conflicts:
	actionpack/CHANGELOG.md
2011-12-01 21:18:47 +01:00
David Heinemeier Hansson
83d29a283c Revert "Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack"
Needless indirection with no added value.

This reverts commit 535853e83b.
2011-12-01 20:45:47 +01:00
José Valim
0b677b18ff Add an ExceptionWrapper that wraps an exception and provide convenience helpers. 2011-12-01 20:02:00 +01:00
David Heinemeier Hansson
535853e83b Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack 2011-12-01 19:47:14 +01:00
David Heinemeier Hansson
218c272938 Allow fresh_when/stale? to take a record instead of an options hash [DHH] 2011-12-01 19:16:10 +01:00
José Valim
38ab982cff Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts. 2011-11-30 09:53:09 +01:00
Xavier Noria
b6916e0b92 removes a Serialization constant left in the previous revert 2011-11-25 15:06:30 -08:00
José Valim
0a4035b12a Revert the serializers API as other alternatives are now also under discussion 2011-11-25 19:29:39 +00:00
José Valim
696d01f7f4 Add docs to serializers. Update CHANGELOGs. 2011-11-25 09:49:54 +00:00
José Valim
7fcc8c0a1f Rely solely on active_model_serializer and remove the fancy constant lookup. 2011-11-23 23:45:27 +00:00
José Valim
e62de52aa3 Merge branch 'master' into serializers 2011-11-23 20:43:06 +00:00
José Valim
fd86a1b6b0 Rely on a public contract between railties instead of accessing railtie methods directly. 2011-11-23 19:06:45 +00:00
lest
5bcd119b8d move show_detailed_exceptions? to Rescue module 2011-11-22 13:34:13 +03:00
lest
a9e8cf78fd add ActionController::Metal#show_detailed_exceptions? 2011-11-22 11:38:24 +03:00
Xavier Noria
c3035e1800 Merge pull request #3613 from mitio/fix-actionpack-responder-docs
Fix wording and minor typos in the Responder RDoc
2011-11-11 10:03:29 -08:00
Dimitar Dimitrov
a766d834a7 Fix wording and minor typos in the Responder RDoc 2011-11-11 19:52:38 +02:00
José Valim
d2cfa982fd Merge pull request #3581 from amatsuda/metal_response_body_19
AC::Metal#response_body= stores different value in Ruby 1.8 and 1.9
2011-11-10 00:49:14 -08:00
Ivan Evtukhovich
cf0a96bc6a DrbStore removed from cache backends 2011-11-07 18:57:55 +04:00