diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2014-04-13 10:28:56 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2014-04-13 10:28:56 -0300 |
commit | 8b3ff37cb77e1f3976e6108b67414d0666f36574 (patch) | |
tree | 961ac393d67fdd7bacc675ff7ed9c41542416d67 /guides/source/routing.md | |
parent | 090db0ff7d2611846aef0b38f741dda6204849ce (diff) | |
parent | 2ddbe87e7acc324ce7e0a4784c4d10b79cc49a40 (diff) | |
download | rails-8b3ff37cb77e1f3976e6108b67414d0666f36574.tar.gz rails-8b3ff37cb77e1f3976e6108b67414d0666f36574.tar.bz2 rails-8b3ff37cb77e1f3976e6108b67414d0666f36574.zip |
Merge pull request #14718 from mcmorgan/update-documentation-to-match-generated-config
Update documentation to use Rails.application instead
Diffstat (limited to 'guides/source/routing.md')
-rw-r--r-- | guides/source/routing.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index 921658a71e..0783bce442 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -711,7 +711,7 @@ class BlacklistConstraint end end -TwitterClone::Application.routes.draw do +Rails.application.routes.draw do get '*path', to: 'blacklist#index', constraints: BlacklistConstraint.new end @@ -720,7 +720,7 @@ end You can also specify constraints as a lambda: ```ruby -TwitterClone::Application.routes.draw do +Rails.application.routes.draw do get '*path', to: 'blacklist#index', constraints: lambda { |request| Blacklist.retrieve_ips.include?(request.remote_ip) } end |