Sha256: cafc733abfb2c8583cef9d93b0464d5f03a59268fbdae9e059a231e85379cff2

Contents?: true

Size: 438 Bytes

Versions: 6

Compression:

Stored size: 438 Bytes

Contents

class ViewAlbumsController < ApplicationController

  def index
		@albums = Album.page(params[:search], params[:page])
  end

  def show
		if Album.find_by_filename(params[:filename]) == nil
			@album = Album.find(:first)
			render :file => "#{RAILS_ROOT}/public/404.html", :layout => false, :status => 404
		else
			@album = Album.find_by_filename(params[:filename])
			@photos = @album.photos.album_page(params[:page])
		end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dust-generators-0.1.9 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.8 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.7 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.6 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.5 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.4 rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb