Bump?! Please Help,
Thanks In Advance, Joe On Jul 26, 7:29 am, Joe <j...@dev-hq.co.uk> wrote: > 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.