A gem for rails which u can split routes.rb into smaller parts.
Add this line to your application's Gemfile:
gem 'wow-route', :git => 'https://github.com/winterbang/wow-route.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install wow-route
Running command below to generate a admin.rb
file in config/routes
directory:
$ rails g wow:route admin
and then u can edit this file like config/routes.rb
.
For example
namespace :admin do
resources :posts, :comments
end
For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html.
If there is any thing you'd like to contribute or fix, please:
- Fork the repo
- Add tests for any new functionality
- Make your changes
- Verify all new & existing tests pass
- Make a pull request
The gem is available as open source under the terms of the MIT License.
欢迎加入Telegram Ruby 群