Zuhao Wan
51dc7c2adb
Add with_default_charset helper.
2014-05-28 21:17:16 +08:00
Rafael Mendonça França
6c5f43bab8
Deprecate all *_filter callbacks in favor of *_action callbacks
...
This is the continuation of the work started at
9d62e04838f01f5589fa50b0baa480d60c815e2c
2014-05-27 19:10:14 -03:00
Aaron Patterson
cd037783b0
rm dead code
2014-05-27 14:52:59 -07:00
Aaron Patterson
2ffa126f79
PARAMETERS_KEY is only used in the request, so move the constant there
2014-05-27 14:46:04 -07:00
Aaron Patterson
cfdab77d1f
Merge branch 'constraints'
...
* constraints:
rm reset_parameters because we automatically do it from 9ca4839a
move path_parameter encoding check to the request object
dispatcher doesn't need `call` anymore
call `serve` with the request on dispatchers
constraints class does not need the request class anymore
give all endpoints a superclass
skip the build business if the stack is empty
stop hardcoding path_parameters and get it from the request
we do not need to cache rack_app
a redirect is not a dispatcher by definition, so eliminate test
push is_a check up to where the Constraints object is allocated
pass the request object to the application
pass a request to `matches?` so we can avoid creating excess requests
nothing is passed to `rack_app` anymore, so rm the params
one fewer is_a check
Constraints#app should never return another Constraints object, so switch to if statement
eliminate dispatcher is_a checks
push is_a?(Dispatcher) check in to one place
Always construct route objects with Constraint objects
Conflicts:
actionpack/lib/action_controller/metal.rb
2014-05-27 14:40:55 -07:00
Aaron Patterson
406b1b6464
rm reset_parameters because we automatically do it from 9ca4839a
2014-05-27 14:24:30 -07:00
Aaron Patterson
4797c4caca
move path_parameter encoding check to the request object
2014-05-27 14:01:30 -07:00
Aaron Patterson
97a52283f8
dispatcher doesn't need call
anymore
2014-05-27 13:54:59 -07:00
Aaron Patterson
9ad01d0ade
call serve
with the request on dispatchers
2014-05-27 13:51:58 -07:00
Aaron Patterson
7fe14432d8
constraints class does not need the request class anymore
2014-05-27 13:44:58 -07:00
Aaron Patterson
402c2af550
give all endpoints a superclass
2014-05-27 12:10:24 -07:00
Santiago Pastorino
6f9aff75a5
Merge pull request #15321 from tgxworld/only_find_routes_as_heads_for_head_request
...
Call get_routes_as_head only on HEAD requests.
2014-05-27 14:46:49 -03:00
Aaron Patterson
40514aa23a
skip the build business if the stack is empty
2014-05-26 17:30:17 -07:00
Aaron Patterson
02a9401d78
stop hardcoding path_parameters and get it from the request
2014-05-26 17:19:54 -07:00
Aaron Patterson
d1012b669e
we do not need to cache rack_app
2014-05-26 15:43:14 -07:00
Aaron Patterson
8a826f5d63
a redirect is not a dispatcher by definition, so eliminate test
2014-05-26 13:24:03 -07:00
Aaron Patterson
605ab030a9
push is_a check up to where the Constraints object is allocated
2014-05-26 13:20:43 -07:00
Matthew Draper
72045b2a9f
Skip individual tests upon Dalli::RingError
...
Unlike the outer `rescue`, this one is much more precise about what we
want to handle: a connection failure (`Dalli::RingError`) is not
relevant to what we're testing here. But other Dalli errors may well be
indicating an actual problem.
2014-05-27 04:45:53 +09:30
Rafael Mendonça França
505a263c35
Escape user input before showing in the page.
...
This is not a security issue since this page is not present in
production and user have to type something in the field but is better to
escape the input.
2014-05-26 15:58:51 -03:00
Yves Senn
2ae6e11003
Merge pull request #15325 from tgxworld/no_need_to_call_to_s
...
Remove duplicated to_s method call.
2014-05-26 09:10:00 +02:00
Guillermo Iguaran
22e96d03b0
Fix docs for ActionController::Renderers.add
2014-05-26 01:12:38 -05:00
Guo Xiang Tan
86396f8c30
Remove duplicated to_s method call.
2014-05-25 19:07:57 -07:00
Carlos Antonio da Silva
2926a9af87
Merge pull request #15310 from tgxworld/small_refactor_get_routes_as_head
...
Remove unnecessary flatten! method call.
2014-05-25 20:43:02 -03:00
Aaron Patterson
b18f22d15c
pass the request object to the application
2014-05-25 14:26:48 -07:00
Aaron Patterson
62c013d7b1
pass a request to matches?
so we can avoid creating excess requests
2014-05-25 14:11:34 -07:00
Aaron Patterson
cff0d15e4b
nothing is passed to rack_app
anymore, so rm the params
2014-05-25 14:06:20 -07:00
Aaron Patterson
c1bc70e229
one fewer is_a check
2014-05-25 14:04:08 -07:00
Guo Xiang Tan
15df2a3c79
Call get_routes_as_head only on HEAD requests.
2014-05-25 13:51:53 -07:00
Aaron Patterson
8a51ec0158
Constraints#app should never return another Constraints object, so switch to if statement
2014-05-25 13:43:14 -07:00
Zuhao Wan
839d461b61
The correct status to test should be :switching_protocols.
2014-05-25 16:17:22 +08:00
Guo Xiang Tan
586c346059
Remove unnecessary flatten! method call.
2014-05-25 00:17:23 -07:00
Guillermo Iguaran
f632f79b8d
Merge pull request #15305 from tgxworld/remove_unnecessary_require
...
Remove unnecessary require of Minitest.
2014-05-24 23:08:29 -05:00
Guo Xiang Tan
4ca5a5ea67
Remove unnecessary require of Minitest.
...
Minitest has already been required when calling Minitest.autorun.
2014-05-24 20:36:05 -07:00
Aaron Patterson
b6ec5e2c14
eliminate dispatcher is_a checks
2014-05-24 19:07:26 -07:00
Aaron Patterson
633589c140
push is_a?(Dispatcher) check in to one place
2014-05-24 19:03:12 -07:00
Aaron Patterson
229c9ed896
Always construct route objects with Constraint objects
2014-05-24 18:53:30 -07:00
Aaron Patterson
98c7fe8769
unwrap the constraints object on initialization, eliminate loops
...
Unwrap Constraints objects. I don't actually think it's possible
to pass a Constraints object to this constructor, but there were
multiple places that kept testing children of this object. I
*think* they were just being defensive, but I have no idea.
2014-05-24 17:52:22 -07:00
Rafael Mendonça França
ade105be40
Merge pull request #14986 from dlangevin/trailing-slash-url-generation
...
Fixes URL generation with trailing_slash: true
Conflicts:
actionpack/lib/action_dispatch/http/url.rb
2014-05-24 12:41:28 -03:00
Rafael Mendonça França
fc6e86170f
Merge pull request #15291 from francocatena/router-visualizer-fix
...
Fix router visualizer CSS and JS resources
2014-05-23 21:02:45 -03:00
Franco Catena
aac85defa4
Fix router visualizer CSS and JS resources
2014-05-23 20:38:34 -03:00
Aaron Patterson
cf2a40b8ac
Constraints contructor should always return a Constraints object
...
I know, it's crazy.
2014-05-23 16:29:06 -07:00
Aaron Patterson
2b7b136e0a
default value is never used, so make it required
2014-05-23 16:05:33 -07:00
Aaron Patterson
d991b67040
push options decomposition up so we can extract
2014-05-23 15:55:56 -07:00
Godfrey Chan
3bc684bf04
Merge pull request #15289 from zzak/future_port_c8ddb61
...
Future port c8ddb61 [ci skip]
2014-05-23 15:47:53 -07:00
Aaron Patterson
6d48d97947
glob_param is never used, so rm
...
this also changes the constructor. We don't need to pass more options
than "defaults" (whatever defaults are, ugh. probably another hash of
stupid stuff).
2014-05-23 15:25:46 -07:00
Zachary Scott
1d7b3fa84c
Future port c8ddb61
2014-05-23 14:45:21 -07:00
Aaron Patterson
93ae747c59
use Proc.new to automatically do parameter checking for us
2014-05-23 11:21:26 -07:00
Aaron Patterson
02f3081332
there is no formatter on the router object, so rm
2014-05-23 10:59:44 -07:00
Rafael Mendonça França
7d457e9c70
Merge pull request #15273 from DNNX/formatter-refactoring-4
...
Remove AD::Journey::Formatter#verify_required_parts!
2014-05-23 14:58:00 -03:00
Aaron Patterson
0f5e3a9f6b
decouple the router object from the request class
2014-05-23 10:57:25 -07:00