Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[PATCH] :path_names could be used to customize collection actions too

#1218

For now :path_names is used to customize member actions in resources routing.

Is there a good reason it is not used to customize collection actions too?

I've tested on a simple project with rails edge frozen to copy/paste the two lines from map_member_actions that read the action_path from :path_names to map_collection_actions and it seems to work well.

I think I'll test this later and make a small patch.

Thanks. Nicolas.

Reported by Nicolas Blanco · October 15th, 2008 @ 02:47 PM

State: committed
Milestone: 2.3.4
Assigned to: Michael Koziarski Michael Koziarski
Importance: Low

Activity

  1. Bence Nagy
    Bence Nagy
    • Tag changed from actionpack, resources to actionpack, patch, resources

    I made the patch for this, actionpack tests run fine.

    December 27th, 2008 @ 10:33 PM

  2. Pratik
    Pratik
    • Assigned user set to Pratik
    • State changed from new to incomplete

    Looks ok. Patch is missing tests and docs though.

    Thanks!

    March 7th, 2009 @ 12:06 PM

  3. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from actionpack, patch, resources to actionpack, bugmash, patch, resources

    August 5th, 2009 @ 03:02 PM

  4. Hugo Peixoto
    Hugo Peixoto

    I've attached a patch that contains Nicolas's code and that adds tests and documentation.

    August 9th, 2009 @ 06:32 AM

  5. Kieran P
    Kieran P

    +1 Patch applies cleanly to 2-3-stable, but not to master. Uploading patch that applies to master.

    August 9th, 2009 @ 06:58 AM

  6. Kieran P
    Kieran P
    • Title changed from :path_names could be used to customize collection actions too to [PATCH] :path_names could be used to customize collection actions too

    August 9th, 2009 @ 07:10 AM

  7. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user changed from Pratik to Michael Koziarski
    • State changed from incomplete to open

    August 9th, 2009 @ 11:48 AM

  8. Rizwan Reza
    Rizwan Reza

    verified

    +1 Kieran P's patch works perfectly on master. All tests pass.

    August 9th, 2009 @ 08:06 PM

  9. Rizwan Reza
    Rizwan Reza
    • Tag changed from actionpack, bugmash, patch, resources to actionpack, bugmash, patch, resources, verified

    verified

    +1 Hugo's patch works on 2-3-stable. All tests pass as well.

    August 9th, 2009 @ 08:12 PM

  10. Repository
    Repository
    • State changed from open to committed

    (from [39de15f13655ed78ed7149e8eb8721139a57d501]) Added both the documentation and a test case for the collection path name customization feature.

    [#1218 [PATCH] :path_names could be used to customize collection actions too state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
    http://github.com/rails/rails/commit/39de15f13655ed78ed7149e8eb8721...

    August 9th, 2009 @ 10:27 PM

  11. Repository
  12. Jeremy Kemper
    Jeremy Kemper
    • Tag changed from actionpack, bugmash, patch, resources, verified to actionpack, patch, resources, verified
    • Milestone changed from 2.x to 2.3.4

    cherry-picked Hugo's commits straight to master

    August 9th, 2009 @ 10:29 PM