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:
parent
9d8ff32372
commit
8b3f3c8561
1 changed files with 4 additions and 4 deletions
|
@ -787,8 +787,8 @@ end
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
constraints(RestrictedListConstraint.new) do
|
constraints(RestrictedListConstraint.new) do
|
||||||
get '*path', to: 'restricted_list#index',
|
get '*path', to: 'restricted_list#index'
|
||||||
get '*other-path', to: 'other_restricted_list#index',
|
get '*other-path', to: 'other_restricted_list#index'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
@ -798,8 +798,8 @@ You can also use a `lambda`:
|
||||||
```ruby
|
```ruby
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
constraints(lambda { |request| RestrictedList.retrieve_ips.include?(request.remote_ip) }) do
|
constraints(lambda { |request| RestrictedList.retrieve_ips.include?(request.remote_ip) }) do
|
||||||
get '*path', to: 'restricted_list#index',
|
get '*path', to: 'restricted_list#index'
|
||||||
get '*other-path', to: 'other_restricted_list#index',
|
get '*other-path', to: 'other_restricted_list#index'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue