No release in over 3 years
Low commit activity in last 3 years
useful extensions for rails routes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 5.2.0
 Project Readme

RouterExtension

useful extension for rails routes

Usage

partial routes

you can partialize routes files.

config/routes/admin.rb

namespace :admin do
  root to: 'dashboard#index'
end

config/routes.rb

Rails.application.routes.draw do
  draw :admin

  resources :users
  ...
  ...

end

subdomain

Rails.application.routes.draw do

subdomain ENV['API_SUBDOMAIN'] do
  namespace :api do
  end
end

if ENV['API_SUBDOMAIN'] present, it means constrains subdomain: ENV['API_SUBDOMAIN'] do, but if not presents, just ignore this line.

subdomain configuration becomes effective only when API_SUBDOMAIN given, so you can easyly ignore when development.

Installation

Add this line to your application's Gemfile:

gem 'router_extension'

And then execute:

$ bundle

Or install it yourself as:

$ gem install router_extension

License

The gem is available as open source under the terms of the MIT License.