Aah wait. One last issue, and it IS the last problem.
I can't get it to display the URL right; basically it goes to
tutorials/NextTutID and I want it to go to categories/catID/
tutorials/NextTutID
In routes.rb this is the line that makes most things go like this:
map.connect 'categories/:id/tutorials/:action', :controller =>
'categories'
To get it working from this I tried using this link for the link, but
it didn't seem to make a difference:
<% @NextLesson = Tutorial.next_lesson(@tutorial.position,
@tutorial.category_id) %>
<%= link_to 'Next lesson', @NextLesson, :controller =>
'categories', :id => (@category.id), :action => (@NextLesson) %>
When I've used this format before I've used lines like this, but this
technique is basically what I've done above, and it just isn't
changing..
<%= link_to tutorial.name, :controller => 'categories', :id =>
(@category), :id => (@category.id), :action => (tutorial.id) %>
I think that my routes.rb route URL system is currently bad as it
randomly uses the action as the tutorial id etc, but I didn't konw
another way to do it so it's setup this way now; Does anyone know how
I can change the URL it links to from tutorials/11 (for example) to
categories/1/tutorials/11 ?
This is my LAST query on this topic and when it's sorted I will have
finally finished a new system I'm working on!
Thanks for all your help so far guys,
Please Help,
Thanks In Advance,
Joe