Skip to content

Commit

Permalink
replaced old way of specifying http method by the new one
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Aug 16, 2014
1 parent cffd6b9 commit c9bdb4a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cookbook/routing/redirect_trailing_slash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ system, as explained below:
defaults: { _controller: AcmeDemoBundle:Redirecting:removeTrailingSlash }
requirements:
url: .*/$
_method: GET
methods: [GET]
.. code-block:: xml
Expand All @@ -53,7 +53,7 @@ system, as explained below:
<route id="remove_trailing_slash" path="/{url}">
<default key="_controller">AcmeDemoBundle:Redirecting:removeTrailingSlash</default>
<requirement key="url">.*/$</requirement>
<requirement key="_method">GET</requirement>
<method>GET</method>
</route>
</routes>
Expand All @@ -72,8 +72,11 @@ system, as explained below:
),
array(
'url' => '.*/$',
'_method' => 'GET',
)
),
array(),
'',
array(),
array('GET')
)
);
Expand Down

0 comments on commit c9bdb4a

Please sign in to comment.