을 게시물 지수에 댓글을 제한하고 2. 아래나는 레일에 새로운 오전 레일에 앱
내 게시물 색인 페이지에 표시되는 댓글의 수를 제한하려고하는 것은 내 posts_controller입니다 PHOT :
has_attached_file 내 포스트 모델
,451,515,클래스 포스트 < 액티브 :: 자료입니다 > => "600x600>", : thumb => "100x100>"} => "# {RAILS_ROOT}/config/s3, : storage => : s3, :> YML " : 경로 =>"/ : 첨부 파일/: ID/: 스타일/: 파일 이름 "
has_many :
유효성을 검사 의견 : 이름 : 존재 => 사실이 확인합니다 : 제목 : 존재 = > 참 : 길이 => {최소 => 5}단부
아래는 내 게시물
<% div_for comment do %>
<p>
<strong>Posted <%= time_ago_in_words(comment.created_at) %> ago
</strong>
by
<br/>
<%= h(comment.commenter) %>
<br/>
<%= h(comment.body) %>
<br/>
<%= link_to 'More Comments', comment.post %>
</p>
<% end %>
내가 오류 메시지가 표시되지 않는 경우 아래
<table>
<tr>
<th>BoxScore</th>
<th>Content</th>
</tr>
</table>
<% @posts.each do |post| %>
<%= image_tag post.photo.url(:medium), :class =>"floatleft" %>
<p>
<%= post.content %>
</p>
<div class="comments center">
<h3>Comments:</h3>
<%= render :partial => post.comments.reverse %>
<div class="links">
<% if admin? %>
<%= link_to "New Post", new_post_path %>
<%= link_to 'Edit', edit_post_path(post) %>
<%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %>
<% end %>
<%= link_to 'Comment on the Game', post %>
</div>
</div>
<% end %>
</div>
댓글 부분 인덱스이다, 난 그냥 우리가 렌더링되는 의견의 양을 제한하는 방법을 모른다 게시물 색인 페이지. 감사합니다
당신은 당신의 부분의 내용도 의견에 관련 먹으 렴를 게시하고이 함께지고 오류의 종류를 말해야한다. –