I’m very new to Rails (1.2) and I’m trying to work something out:
I have an AdminController which provides a basic index action and view.
I also have a bunch of resources eg. Profiles, etc. these resources
utilize the RESTful resource controllers created using the
“script/generate scaffold_resource…” generator.
Currently I have the following mapping:
map.resource :profiles, :path_prefix => “/admin”
I’d like to be able to map the resources so they are accessible from
/admin only, however, I’m finding I can access the profiles controller
from both /profiles and /admin/profiles. I’d like to be able only access
the profile controller from admin, and then be able to allow/deny access
to actions based on member authentication/authorisation.
I’ve read all the posts/articles on nested resources, folder/controller
hacks etc (the latter I can’t get to work either), and I don’t seem to
be getting anywhere.
Can anyone throw some light please?
Cheers and thanks in advance.
Rick O. wrote:
On 3/20/07, Dominique J. [email protected] wrote:
Can anyone throw some light please?
Cheers and thanks in advance.
Do you have the standard map.connect ‘:controller/:action/:id’ route
in there still?
–
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
Hi Rick, and thanks for the reply. I check out your Lighthouse app the
other day and was quite jealous. I was in the process of creating
somethign similar as a value add to another web app. It’s very nice.
Um, yes I do still have the standard map.connect at the very bottom on
the routes file.
On 3/20/07, Dominique J. [email protected] wrote:
Can anyone throw some light please?
Cheers and thanks in advance.
Do you have the standard map.connect ‘:controller/:action/:id’ route
in there still?
–
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
Hi Rick, and thanks for the reply. I check out your Lighthouse app the
other day and was quite jealous. I was in the process of creating
somethign similar as a value add to another web app. It’s very nice.
Thanks.
Um, yes I do still have the standard map.connect at the very bottom on
the routes file.
That’s why you can still access it as /profiles. I typically remove
this route, as any controllers typically have named routes created for
them.
–
Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
Rick O. wrote:
That’s why you can still access it as /profiles. I typically remove
this route, as any controllers typically have named routes created for
them.
Thanks heaps I’m so grateful because I been mucking around with this for
far too long now. Cheers.