Rails 3: Routing to Customer Service Areas

I am new to Rails 3 but have experience with other MVC web frameworks and need some initial hint on how to configure routing in Rails. The application must allow users to register, and after that, user data should be available at the following URLs:

http: // domainname / username / xyz

A common and user-independent part should be available in

http: // domainname / abc

To distinguish between both routes, I would force usernames to have at least 6 characters, and all "abc" -routes would have 5 or less. Up to this point, I could manage the routing myself, but for the "xyz" part of the user area, I would like to use the existing REST functions for the rails. Any hint how to do this?

-1
source share
1 answer

Have you read http://edgeguides.rubyonrails.org/routing.html ?

This is a really good resource for these kinds of questions. I believe that some of the schemes you describe fall into the Non-Resourceful category.

+1
source

Source: https://habr.com/ru/post/927065/


All Articles