Created
November 20, 2017 19:09
-
-
Save thedrewbisset/7637ef8ef7a1c8a7e22fc5b950f8c136 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SmallThings::Application.routes.draw do | |
namespace :core do | |
resources :things, param: :name, only: [:create, :show] do | |
member do | |
resource :component, only: :create, module: :things, as: :things_component | |
end | |
end | |
end | |
end | |
# Produces routing and file-pathing that match 1:1 and set things up well for containing resource complexity within | |
# components that are colocated within a parent module type: | |
# | |
# core_things POST /core/things core/things#create | |
# core_things GET /core/things/:name core/things#show | |
# core_things_component POST /core/things/:name/component core/things/components#create |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment