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
Aaron Patterson
3913b510b7
Added custom regexps to ASTs that have literal nodes on either side of
...
symbol nodes. Fixes #4585
2012-01-23 17:21:29 -08:00
José Valim
08d6eb6824
Do not deprecate performed?
2012-01-19 19:45:22 +01: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
Piotr Sarnacki
d65b766426
Fix http digest authentication with trailing '/' or '?' ( fixes #4038 and #3228 )
2012-01-10 04:42:46 +01:00
Aaron Patterson
63f7a61246
When generating routes, the last defined named route wins. This is in
...
contrast to route recognition where the first recognized route wins.
This behavior will not exist in Rails 4.0.
See:
https://github.com/rails/rails/issues/4245
https://github.com/rails/rails/issues/4164
2012-01-03 14:00:24 -08:00
Aaron Patterson
e9122112fa
Revert "Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)"
...
This reverts commit 71d769e3b5 .
2012-01-03 13:56:12 -08:00
Sergey Nartimov
5f09414f85
deprecate ActiveSupport::Base64
...
extend and define ::Base64 if needed
2012-01-03 00:57:03 +03:00
Aaron Patterson
50af25ba87
last named route wins. fixes #4164
...
This differs from route recognition where first recognized route wins.
This will not be supported in Rails 4.0 so that route recognition and
generation rules are consistent.
2011-12-28 16:33:40 -08: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
Aaron Patterson
5f2bfce9e0
adding an integration test for splat regexp substitutions. fixes #4138
2011-12-22 18:53:09 -07:00
Aaron Patterson
a32d3d0ad9
Adding an integration test. Fixes #4136
2011-12-22 18:04:59 -07:00
Aaron Patterson
2bc3f81c89
rack bodies should be a list
2011-12-22 13:09:54 -07:00
Aaron Patterson
585e291250
refactoring routing tests
2011-12-22 12:56:36 -07:00
Aaron Patterson
d5ccb5cf65
adding integration test for journey #7
2011-12-21 11:46:59 -07:00
Aaron Patterson
79778ffac5
caches should not be global, so no need to clear in the teardown
2011-12-21 11:46:53 -07:00
lest
e97aa2c22c
remove warnings about @variable_for_layout
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-12-20 14:24:01 +01:00
Aaron Patterson
9d0789c415
adding tests for #4029
2011-12-19 13:34:54 -08:00
Arun Agrawal
23334be5b8
warning removed "warning: instance variable @variable_for_layout not initialized"
2011-12-17 12:00:57 +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
deef8dd682
Extract the rendering of public exceptions pages into a Rack app.
2011-12-16 10:45:59 +01:00
José Valim
d142572567
Get rid of the close checks since we cannot reliably close the session anyway.
2011-12-16 10:45:59 +01:00
Xavier Noria
5e0dec5e10
it's -> its
2011-12-15 12:57:33 -08:00
José Valim
26e7400cc5
Fix diagnostics page for routing errors.
2011-12-15 19:43:49 +01:00
choonkeat
5f67cfeda1
Fix url_for options[:subdomain] to allow objects as values
...
* e.g. blog_url(subdomain: current_user) instead of blog_url(subdomain: current_user.to_param)
2011-12-14 22:43:42 +08:00
José Valim
d4d99bbc87
Fix another regression related to the layout optimization.
2011-12-08 22:56:50 +01:00
José Valim
ebd71fd0e3
Fix a regression and also fix broken test.
2011-12-08 21:00:34 +01:00
kennyj
3ade2f8e89
Fix warning for params_wrapper_test.
2011-12-08 23:09:09 +09: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
José Valim
f6cc4fd7a2
Merge pull request #3861 from andyjeffries/master
...
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 08:48:25 -08:00
lest
1f0e21ce30
use classify in ParamsWrapper to derive model name from controller name
2011-12-05 19:15:36 +03:00
Andy Jeffries
71d769e3b5
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 15:41:38 +00: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
José Valim
750bb5c865
Split ShowExceptions responsibilities in two middlewares.
2011-12-01 20:46:18 +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
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
lest
565d92f578
fix method redefined warnings in tests
2011-11-30 18:57:12 +03: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
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
fcacc6986a
Merge branch 'serializers'
...
This implements the ActiveModel::Serializer object. Includes code, tests, generators and guides.
From José and Yehuda with love.
Conflicts:
railties/CHANGELOG.md
2011-11-25 09:59:35 +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
kennyj
453f5534b4
Warnings removed. (ambiguous first argument)
2011-11-24 00:10:34 +09:00