Editing Tutorials Copy thread as the other one seems to have glitched

This was my post but the thread has glitched (to my understanding) so
here it is again (please delete if the other one starts
working…) …

Hi, Ive recently bene trying to find a way to edit my tutorials (which
are stored inside categories) in my RoR app. To edit my category’s
names I use the following in the category show file:

<%= link_to ‘Edit’, edit_category_path(@category) %>

And this is edit in the categories controller:

def edit
@category = Category.find(params[:id])
end

but when I change this to tutorials:

<%= link_to ‘Edit’, edit_tutorial_path(@tutorial) %>

and

def edit
@tutorial = Tutorial.find(params[:id])
end

I get this error on the tutorial show page:

undefined method `edit_tutorial_path’ for #<ActionView::Base:
0x5ce52fc>

(or something of those origins)

I had the origional category system setup for me, so I dont know that
much about how the categories are editable. Therefore its hard for me
to figure out how to edit the tutorials.

Please Help,

(If you need any more information please just ask),

Thanks In Advance,

Joe

Joe wrote:

undefined method `edit_tutorial_path’ for #<ActionView::Base:
0x5ce52fc>

(or something of those origins)

Thanks In Advance,

Joe

check out your routes file … config/routes.rb and then possibly google
“restful routing rails” if you are still stuck

hth
ilan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs