Remove trailing commas in advanced route constraints example

This commit is contained in:
wout@mick-wout.com 2021-01-21 15:21:17 +00:00
parent 9d8ff32372
commit 8b3f3c8561
1 changed files with 4 additions and 4 deletions

View File

@ -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
```
@ -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
```