app/controllers/albums_controller.rb in mix-rails-albums-0.23.1 vs app/controllers/albums_controller.rb in mix-rails-albums-0.24.0
- old
+ new
@@ -1,11 +1,12 @@
class AlbumsController < ApplicationController
def index
- @albums = Album.published.paginate(:page => params[:page], :per_page => 12)
+ @albums = Album.published.desc.paginate(:page => params[:page], :per_page => 12)
end
def show
@album = Album.find(params[:id])
+ @photos = @album.photos.paginate(:page => params[:page], :per_page => 12)
end
end
\ No newline at end of file