You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Next Release
12
12
#### Fixes
13
13
14
14
*[#1505](https://github.com/ruby-grape/grape/pull/1505): Run `before` and `after` callbacks, but skip the rest when handling OPTIONS - [@jlfaber](https://github.com/jlfaber).
15
-
*[#1517](https://github.com/ruby-grape/grape/pull/1517): Modify the priority of ANY routes, fixes #1089 - [@namusyaka](https://github.com/namusyaka), [@wagenet](https://github.com/wagenet).
15
+
*[#1517](https://github.com/ruby-grape/grape/pull/1517), [#1089](https://github.com/ruby-grape/grape/pull/1089): Fix: priority of ANY routes - [@namusyaka](https://github.com/namusyaka), [@wagenet](https://github.com/wagenet).
Copy file name to clipboardExpand all lines: UPGRADING.md
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,9 @@ Upgrading Grape
3
3
4
4
### Upgrading to >= 0.18.1
5
5
6
-
#### Modify the priority of :any routes
6
+
#### Changes in priority of :any routes
7
7
8
-
Conventional, the :any routes had been searched after matching first route and 405 routes.
9
-
This version adds the :any routes processing before 405 processing, so the behavior of following code will be changed.
8
+
Prior to this version, `:any` routes were searched after matching first route and 405 routes. This behavior has changed and `:any` routes are now searched before 405 processing. In the following example the `:any` route will match first when making a request with an unsupported verb.
10
9
11
10
```ruby
12
11
post :exampledo
@@ -16,7 +15,7 @@ route :any, '*path' do
16
15
error! :not_found, 404
17
16
end
18
17
19
-
get '/example'#=> before: 405, currently: 404
18
+
get '/example'#=> before: 405, after: 404
20
19
```
21
20
22
21
#### Removed param processing from built-in OPTIONS handler
0 commit comments