I feel stupid even asking this as it seems like it should be so simple. I am just working through the basics and trying to customize my scaffold. I am working on the show action right now.
Here is what I have for the show action in the controller
And here is what I have in my viewCode:def show @blog = Blog.find(params[:id]) end
This is the error I get: undefined local variable or method `blog' for #<#<Class:0x35ed30c>:0x35ed2e4>Code:<h2><%= link_to @blog["title"], :action => 'show', :id => blog %></h2> <p><%= @blog["body"] %></p> <p><small><%= @blog["created_at"] %></small></p>
Can anyone help me out with this?






Bookmarks