Changing the model_path.

Hi,

I'm new to RoR, but currently need to make some changes to my site to
implement permalinks.
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
sometimes).

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).

Please Help,

Thanks In Advance,

Joe

Bump?!

Please Help,

Thanks In Advance,

Joe

Can anyone help with this?

I really need help,

Please Help,

Thanks In Advance,

Joe

Ok, I think I've made a tiny bit of progress. I've got the URLs I want
to work using routes.rb

I now just need to application to link to the right place, Im trying
to get it to go to "CATID/ID" but it links to "categories/ID?
cat_id=CATID".

I'm giving it all of the correct parameters that my routes require,
however it for some reason want to link to it as shown above.

Please Help,

Thanks In Advance,

Joe

Aha, I think I've finally figured it out with named routes!
However my named route only works when its on the top line, and I need
to make a static map.connect above it or the web app wont work; why
does it make me put it at the top (there is nothing overwriting it or
anything below). When it's not at the top it says this: undefined
method `catpmlnk' (which is the named route name)..

Please help (I'm so close to solving my problems!),

Thanks In Advance,

Joe