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

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -