netzke / netzke-core

Framework for Sencha Ext JS + Ruby on Rails client-server components
http://netzke.org
Other
263 stars 77 forks source link

default_routes config #82

Closed novozhenets closed 8 years ago

novozhenets commented 8 years ago

i was trying to use netzke inside my isolated engine. i have this in my main app routes.rb

Rails.application.routes.draw do
  mount Admin::Engine, at: '/admin'
end

and in my engine's routes.rb

Admin::Engine.routes.draw do
  netzke
end

so i ended up with double netzke routes like this

           Prefix Verb     URI Pattern                         Controller#Action
            admin          /admin                              Admin::Engine
netzke_components GET      /netzke/components/:class(.:format) netzke/testing#components
     netzke_specs GET      /netzke/specs/*name(.:format)       netzke/testing#specs
           netzke GET      /netzke(.:format)                   netzke#index
       netzke_ext GET      /netzke/ext(.:format)               netzke#ext
    netzke_direct GET|POST /netzke/direct(.:format)            netzke#direct
netzke_dispatcher GET|POST /netzke/dispatcher(.:format)        netzke#dispatcher

Routes for Admin::Engine:
           netzke GET      /netzke(.:format)            admin/netzke#index
       netzke_ext GET      /netzke/ext(.:format)        admin/netzke#ext
    netzke_direct GET|POST /netzke/direct(.:format)     admin/netzke#direct
netzke_dispatcher GET|POST /netzke/dispatcher(.:format) admin/netzke#dispatcher

couldn't find any way to avoid it, so i added new config variable to be able to disable default routes

mxgrn commented 8 years ago

Thanks!