Skip to content

Instantly share code, notes, and snippets.

@mcob
Created June 9, 2014 18:51
Show Gist options
  • Save mcob/d69172d83d72449243d2 to your computer and use it in GitHub Desktop.
Save mcob/d69172d83d72449243d2 to your computer and use it in GitHub Desktop.
manage_department_families GET /manage/departments/:slug/families(.:format) manage/departments#families
manage_departments GET /manage/departments(.:format) manage/departments#index
POST /manage/departments(.:format) manage/departments#create
new_manage_department GET /manage/departments/new(.:format) manage/departments#new
edit_manage_department GET /manage/departments/:id/edit(.:format) manage/departments#edit
manage_department GET /manage/departments/:id(.:format) manage/departments#show
PATCH /manage/departments/:id(.:format) manage/departments#update
PUT /manage/departments/:id(.:format) manage/departments#update
DELETE /manage/departments/:id(.:format) manage/departments#destroy
# >>>>>> want to still use the 'edit_department_path' and have it locate to '/manage/departments/1/edit
@xionon
Copy link

xionon commented Jun 9, 2014

Conductor does have a separate /admin namespace, because the view that the CMS admins see is much different from what the browser user sees. In that case, all our route helpers are prefixed with admin_, because "page_path" and "admin_page_path" are semantically different. If the /manage section is similar to an admin, I'd highly suggest you keep the manage_ prefix, because you can't predict if your app will someday need to respond to /departments as well as /manage/departments

@mcob
Copy link
Author

mcob commented Jun 9, 2014

that's what I am doing. The big app I am working on has several namespaces that have manage_ and system_ for the two admin like sections.

This one is small in scope and I was just wanting to be lazy. Already when through and updated all the paths with the prefixes before I even asked a question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment