im getting:  undefined local variable or method `post' for
#<ActionView::Base:0x2673624>
where in my code i have the mistake ? please help..



code at index.html.erb
<br/>
<h1>welcome to my weblog!</h1><br/>
<%= render :partial => "posts/preview", :collection => @posts %><br />
<%= link_to 'New post', new_post_path %>



code at   _preview.html.erb
<% div_for post do %>
  <h2><%= link_to_unless_current h(post.title), post %></h2>
  <%= truncate(post.body, :length => 300) %> <br /><br />
<% end %>
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to