Try:
= render :partial => 'posts/post2', :collection => @posts, :as => :post
On Thu, Nov 27, 2008 at 12:46 PM, homiez1 <[EMAIL PROTECTED]> wrote:
>
> Hello. I'm new CE user from Japan.
>
> I wanna make two pattern "views/posts/_post.html.haml",
> like "_post.html.haml" & "_post2.html.haml".
>
> So, I copied _post.html.haml, and then named _post2.html.haml to it.
> To check _post2.html.haml, I rewrite like below on "views/categories/
> _show.html.haml
>
> = render :partial => 'posts/post', :collection => @posts
>
> || || || || || || || || || || || ||
> V V V V V V V V V V V V
>
> = render :partial => 'posts/post2', :collection => @posts
>
> Then, I checked page.
> But I got below error.
> I hope you'll give me some advice.
> ---------------------------------------------------------
> NameError in Categories#show
>
> Showing vendor/plugins/community_engine/app/views/posts/
> _post2.html.haml where line #2 raised:
>
> undefined local variable or method `post' for #<ActionView::Base:
> 0x33afacc>
>
> Extracted source (around line #2):
>
> 1: .hentry
> 2: %h4.entry-title{:id=>"post_#{ post.id}"}
> 3: = link_to post.title, user_post_path(post.user, post), :rel =>
> 'bookmark'
> 4:
> 5: .vcard.author
> ---------------------------------------------------------
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---