order by album.title in collection
This commit is contained in:
parent
b65bce12d1
commit
3e39940dfd
|
@ -13,6 +13,7 @@ class CollectionsController < ApplicationController
|
|||
|
||||
def show
|
||||
@collection = Collection.find( params[:id] )
|
||||
@albums = @collection.albums.find(:all, :order => 'title')
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @collection }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<h2><%= h @collection.title %></h2>
|
||||
<p><%= h @collection.description %></p>
|
||||
|
||||
<% for album in @collection.albums %>
|
||||
<% for album in @albums %>
|
||||
<div class="row">
|
||||
<div class="title">
|
||||
<%= render :partial => "photos/thumb", :locals => {:photo => album.photos.first } unless album.photos.empty? %>
|
||||
|
|
Loading…
Reference in a new issue