Skip to content

Commit

Permalink
Merge pull request rails#41197 from wout/fix-route-constraints-guide
Browse files Browse the repository at this point in the history
Remove trailing commas in route constraints examples [ci skip]
  • Loading branch information
kamipo authored Jan 21, 2021
2 parents 9d8ff32 + 8b3f3c8 commit 9fcaac6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions guides/source/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,8 @@ end

Rails.application.routes.draw do
constraints(RestrictedListConstraint.new) do
get '*path', to: 'restricted_list#index',
get '*other-path', to: 'other_restricted_list#index',
get '*path', to: 'restricted_list#index'
get '*other-path', to: 'other_restricted_list#index'
end
end
```
Expand All @@ -798,8 +798,8 @@ You can also use a `lambda`:
```ruby
Rails.application.routes.draw do
constraints(lambda { |request| RestrictedList.retrieve_ips.include?(request.remote_ip) }) do
get '*path', to: 'restricted_list#index',
get '*other-path', to: 'other_restricted_list#index',
get '*path', to: 'restricted_list#index'
get '*other-path', to: 'other_restricted_list#index'
end
end
```
Expand Down

0 comments on commit 9fcaac6

Please sign in to comment.