NoMethodError in Posts#new
im doing the getting started with Rails tutorial on:
http://guides.rubyonrails.org/getting_started.html when i run the local
server from shell i got this:
NoMethodError in Posts#new /_form.html.erb where line #1 raised: undefined
method `model_name' for NilClass:Class
That is the extracted source(arround line #1):
1: <%= form_for @post do |f| %>
2: <% if @post.errors.any? %>
3: <div id="errorExplanation">
4: <h2><%= pluralize(@post.errors.count, "error") %> prohibited
I just started on Ruby on rails and i can' figure it out what is
happening. Some help must be apreciated. Thanks.
No comments:
Post a Comment