开发者

Scalable, regional and Rails happy approaches to RESTful routing

What's the Rails-ey & RESTful way to route an app that will ref开发者_如何学Pythonerence entities on a national (global?) scale? Edit: this is not related to internationalization (i18n)

users should be able to browse & bookmark entities and optionally log in. each entity will have user(s) (admins?) that can log in and CRUD entities they're associated with. and of course, super-admins can CRUD everything.

i can think of:

/entity/id  #too simple
/us/ma/marblehead/<entity-name>
/entity-name-plus-unique-region-name

what happens if your an admin?

i know this is relatively basic stuff but I'm still trying to wrap my head around routes and the best ways to set up routes.rb.


Are you referring to internationalization? If so, the Rails Guides has some great walkthroughs with very solid suggestions on how to handle this stuff:

http://guides.rubyonrails.org/i18n.html#setting-and-passing-the-locale

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜