On 8/5/07, Hendy Irawan <[EMAIL PROTECTED]> wrote:
>
> When I say:
>
> map.resource 'hello'
>
> How can I specify a custom URL for the resource "hello"?
>
> Or, to put it a different way:
>
> how can I use the URL "hello" but use different named routes?
>
> As of now, it will use:
> * Resource name: hello
> * URL: /hello
> * Controller: hello (in some Rails versions [edge?], mistakenly used
> 'hellos')
> * Named routes: edit_hello, new_hello, formatted_......._hello
>
> What I want is something like:
> * URL: /hello
> * Named routes: edit_world, new_world, formatted_......._world
>
> The reason is because URLs are rich (I may also want to put '/' or other
> special characters like '-') that aren't possible for a named routes name.
> Or I probably want to change only the URL but retain the named routes
> name, or the other way around.
>
> What I'm trying to do specifically is to have:
> URL: /your/account (/edit)
> Named routes: your_account, edit_your_account
> Controller: Your::Account (controllers/your/account_controller.rb)
>
> I'm posting this to core because the routing behavior  seems to be
> changing between 1.2.3, 1.2.3.update, and (soon) 1.2.4.

Nope, you can use named routes for your own conventions.  Or better
yet, take the example of map.resources and write your own.  I've seen
something like map.report_on for custom report routes, for example.


-- 
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to