Currently, a call to resource :users will make the app respond to actions like

/users/new
/users/edit

etc...

All this is very nice, but to to reflect business domain the above
routes would look better if they are

/users/register
/users/edit-profile

or something else.

Currently, this can be achieved by not using the resource() method,
but directly match() (or using both)

The paths in the first example are hard-coded in
http://github.com/wycats/merb/tree/master/merb-core/lib/merb-core/dispatch/router/resources.rb#L240-250

Having hard-coded strings usually is a sign of being opinionated.

It would be much better if the resource method allows something like
the following:

resource :users do
  map :new => 'register'
  map :edit => 'edit-profile'
end

Or some other AP (this one probably isn't the best one)I.

Internally, the routes url(:new_user) would still be used, but it
would generate /users/register instead of /users/new

What do you think of the idea.

Also, I'm new to Merb and Ruby, but I might give it a shot to
implement it with some help.


Regards
Emil Ivanov


-- 
My place to share my ideas:
http://vladev.blogspot.com
http://carutoo.com

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

Reply via email to