diff options
author | Volmer <git@radicaos.com> | 2016-07-04 21:58:20 -0400 |
---|---|---|
committer | Volmer <git@radicaos.com> | 2016-07-05 11:16:54 -0400 |
commit | 1fd9cdfda6c4e4473667cb6e28b8097607abc765 (patch) | |
tree | f4446bccd23db8232bf248e6f3c3a75a9b8d856c /railties/lib/rails/generators/actions/create_migration.rb | |
parent | 9552f8b457a674c66f99d6cbef244fbb7de6ba34 (diff) | |
download | rails-1fd9cdfda6c4e4473667cb6e28b8097607abc765.tar.gz rails-1fd9cdfda6c4e4473667cb6e28b8097607abc765.tar.bz2 rails-1fd9cdfda6c4e4473667cb6e28b8097607abc765.zip |
Deprecate usage of nil as route path
In Rails 4 these kind of routes used to work:
```ruby
scope '/*id', controller: :builds, as: :build do
get action: :show
end
```
But since 1a830cbd830c7f80936dff7e3c8b26f60dcc371d, routes are only created for
paths specified as strings or symbols. Implicit `nil` paths are just ignored,
with no deprecation warnings or errors. Routes are simply not created. This come
as a surprise for people migrating to Rails 5, since the lack of logs or errors
makes hard to understand where the problem is.
This commit introduces a deprecation warning in case of path as `nil`, while
still allowing the route definition.
Diffstat (limited to 'railties/lib/rails/generators/actions/create_migration.rb')
0 files changed, 0 insertions, 0 deletions