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:
$ bundleOr install it yourself as:
$ gem install wow-routeRunning command below to generate a admin.rb file in config/routes directory:
$ rails g wow:route adminand then u can edit this file like config/routes.rb.
For example
namespace :admin do
resources :posts, :comments
endFor 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 群