Sha256: 382fc0af357e0b696c5e5bd2014bae89294d952ba23fdc2756015870b3fcccb1

Contents?: true

Size: 462 Bytes

Versions: 16

Compression:

Stored size: 462 Bytes

Contents

class ViewAlbumsController < ApplicationController
	unloadable
	
  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.page(params[:search], params[:page])
		end
  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
dust-generators-0.2.3 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.2.2 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.2.1 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.2.0 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.9 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.8 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.7 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.6 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.5 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.4 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.3 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.2 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.1 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.1.0 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust-generators-0.0.3 lib/generators/dust/albums/templates/app/controllers/view_albums_controller.rb
dust_albums-0.0.2 app/controllers/view_albums_controller.rb