Rails routing helpers -


i have project structure: module xxx, has models, controllers, etc. inside module have admin module. example, when define routes:

scope module: 'xxx'   namespace :admin      resources :pages   end end 

i helper 'new' action: 'new_admin_page_path'. doesn't looks pretty good. want has 'admin_new_page_path'. may wrong think name looks better. how can in more correct way? possible have 'xxx_admin_new_page_path'?

upd: want actions have format, not new. example: xxx_admin_pages_path, xxx_admin_new_page_path, xxx_admin_edit_page_path , xxx_admin_page_path

there no documentation on doing resources. afaik it's not possible.

  scope 'xxx', as: :xxx     scope 'admin', as: :admin       'pages', controller: 'posts', action: 'index', as: :pages       'pages/new', controller: 'posts', action: 'index', as: :new_pages     end   end 

Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -