I'm new to RoR, but currently need to make some changes to my site to
Whenever I do a link, I use: category_path(category) and then the
to_param permalinks it. The previous piece of code would link you to /
categories/CategoryPermalink; the trouble is I don't want it to be /
categories, I just want it to be /PERMALINK.
Then I'm getting into even more trouble, as each category has_many
tutorials, I have to do the same with this. At the moment
tutorial_path(tutorial) makes it go to /tutorial/TutorialPermalink,
however I want it to go to /CategoryPermalink/TutorialPermalink.
Is there any way of doing this (at the moment I'm playing around with
routes.rb, and then changing the action, and controller in the link; I
don't really know what I'm doing, but this seems to alter the URL
After I figure this out I have to then redirect all of the other URLs
(/categories/id, /tutorials/id, /CategoryPermalink/tutorialid, /
categories/id/tutorials/id and any other URLs that have the same type
of ideas) to the right URLs (I don't have a clue how to do this
either, but I guess I'll leave that for another thread).
Thanks In Advance,