Simplify partial rendering when the partial is named after the model
This commit is contained in:
parent
5b4636d521
commit
3914050fcc
17 changed files with 17 additions and 23 deletions
|
@ -1 +0,0 @@
|
|||
<%= render :partial => "diary_entry", :object => diary_index_entry %>
|
|
@ -32,11 +32,7 @@
|
|||
<% else %>
|
||||
<h4><%= t ".recent_entries" %></h4>
|
||||
|
||||
<% if @user %>
|
||||
<%= render :partial => "diary_entry", :collection => @entries %>
|
||||
<% else %>
|
||||
<%= render :partial => "diary_index_entry", :collection => @entries %>
|
||||
<% end %>
|
||||
<%= render @entries %>
|
||||
|
||||
<div class="pagination">
|
||||
<% if @entries.size < @page_size -%>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "diary_entry", :object => @entry %>
|
||||
<%= render @entry %>
|
||||
|
||||
<a id="comments"></a>
|
||||
<div class='comments'>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue