I believe there is a naming convention to follow if you''re using
the :collection option. if your collection is called @posts your
partial should be called the singular (_post.html.erb).
Try then
<%= render :partial => :post, :collection => @posts %>
I''m sure there are other (better) ways to do this... I''ve had
success
following this convention tho.
HTH
SH
On Jul 31, 12:50 pm, Justin To
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> def view_history
> @posts = Post.search_by_requirement_id(params[:id], params[:page])
> end
>
> view_history.html.erb
>
> <%= render :partial => :threads, :collection => @posts %>
>
> The @posts in view_history doesn''t seem to make it to the
> _threads.html.erb
>
> Help!!
>
> Thanks! =)
> --
> Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---