Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show
- @post = Post.find(params[:id])
- @comment = @post.comments.build
- @title = @post.title
- @hide_edit_links = hide_links?
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @post }
- end
- end
- show.html.erb --> peta
- <%= render :partial => "display_post", :locals =>{:post => @post}%>
- <h5 name="comments">Comments</h5>
- <div id="comments-div">
- <ol id="comments" class="comments">
- <%= render :partial => "comments/comment", :collection => @post.comments %>
- </ol>
- </div>
- <%= render :partial => "comments/new"%>
- --
- <%= render :partial => "display_post", :locals =>{:post => @post}%>
- <h5 name="comments">Comments</h5>
- <div id="comments-div">
- <% puts @post.comments.inspect %> !!!! con esto no peta
- <ol id="comments" class="comments">
- <%= render :partial => "comments/comment", :collection => @post.comments %>
- </ol>
- </div>
- <%= render :partial => "comments/new"%>
- comment
- <li class="comment" id="comment-<%= comment.id %>">
- <% puts comment.inspect %>
- <% hcard_for comment.author do |h|%>
- <%= h.fn %> – <abbr title="<%= comment.created_at.to_formatted_s(:long) %>"><span class="date"><%= comment.created_at.to_formatted_s(:long_ordinal) %></span></abbr>
- <% end %>
- <div class="content">
- <%= sanitize comment.body %>
- </div>
- </li>
Add Comment
Please, Sign In to add comment