jhaagmans wrote: > In your partial, you use the variable post. But post doesn't exist. At > least not as far as I can see. You've sent along a variable @posts and > you will probably have to use that in some kind of for loop. > > For example: > <% for post in @posts do %> > <% div_for post do %> > <h2><%= link_to_unless_current h(post.title), post %></h2> > <%= truncate(post.body, :length => 300) %> <br /><br /> > <% end %> > <% end %> > > Hope this helps! > > Jaap Haagmans > w. http://www.relywebsolutions.nl > > On 9 aug, 00:12, Philip Gavrilos <rails-mailing-l...@andreas-s.net>
THANK YOU! THANK YOU! THANK YOU! WORKS FINE! i did not understand my error here its because im newbie in ruby ( :P ) (if _preview was _post everything was fine.. i think that is because naming conventions right?) -- 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 -~----------~----~----~----~------~----~------~--~---