Ruby on rails - Template missing prob -
i having hard time solving problem because first time learn ruby on rail, have index.html.erb, new.html.erb, show.html.erb, edit.html.erb files. when go localhost:3000/blogs/edit page page showing show.html.erb , when delete show.html.erb access edit.html.erb im having template missing error. when access localhost:3000/blogs/new or localhost:3000/blogs working fine.so here's code inside blogs_controller.rb
class blogscontroller < applicationcontroller def index @content_first = 'this 1' ; @content_two = 'this 2' ; end def new end def create end def edit end def update end def show end def destroy end end
i think problem you're trying access /blogs/edit , , route /blogs/edit/:id. in need provide id of blog object, can edit it.
if run
rake routes
you able see available routes.
hope helps =)
Comments
Post a Comment