I have a padrino project.
I've created a sub app called "users".
I also have a model called user and a controller called users to handle the routing.
Users.controllers :users do
The issue with that is that the urls being produced and being responded to are
app.com/users/users/index etc
unless I go to each action and map it
get :index, :map => '/' do
Is there a better way of doing this?
I don't really want to put the actions in the app.rb for the app.. even though that works great. I like having the separation.
Is there anything like
Users.controllers :users do
map '/'
end
Is there a naming convention that I can follow to create a default controller that would response to my apps root url?
I'd like to keep it in the users controller so that I can use the users_index etc
Gems included by the bundle:
activemodel (3.2.1)
activerecord (3.2.1)
activesupport (3.2.1)
arel (3.0.0)
bcrypt-ruby (3.0.1)
builder (3.0.0)
bundler (1.0.21)
haml (3.1.4)
http_router (0.10.2)
i18n (0.6.0)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.4)
padrino (0.10.6.c)
padrino-admin (0.10.6.c)
padrino-cache (0.10.6.c)
padrino-core (0.10.6.c)
padrino-gen (0.10.6.c)
padrino-helpers (0.10.6.c)
padrino-mailer (0.10.6.c)
polyglot (0.3.3)
rack (1.4.1)
rack-protection (1.2.0)
rack-test (0.6.1)
rake (0.9.2.2)
sass (3.1.13)
shoulda (2.11.3)
sinatra (1.3.2)
sinatra-flash (0.3.0)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
url_mount (0.2.1)
If I have to map the path for each action in the controller when my app name matches my controller name, that's fine. I was just wondering if there was a way to set the base or root path for all my actions via the controller.
Thanks