Phcpresspro::Engine.routes.draw do # Mount Accounts Engine mount Phcaccountspro::Engine, :at => '/' # Application Articles namespace :article do resources :categories, class_name: 'Phcpresspro::Articles::Category' resources :posts, class_name: 'Phcpresspro::Articles::Post' end # Application FrontEnd namespace :blog do resources :articles, only: [:index, :show] end # Application API namespace :api do namespace :v1 do resources :posts, defaults: {format: 'json'} resources :categories, defaults: {format: 'json'} end end end