1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

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