Class: PhotoAlbumsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PhotoAlbumsController
- Defined in:
- app/controllers/photo_albums_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/controllers/photo_albums_controller.rb', line 10 def index if @photo_gallery @photo_albums = @photo_gallery.albums.ordered else @photo_albums = SpudPhotoAlbum.ordered end respond_with @photo_albums end |
#show ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/controllers/photo_albums_controller.rb', line 19 def show @photo_album = SpudPhotoAlbum.find_by(:url_name => params[:id]) if @photo_album.blank? raise Spud::NotFoundError.new(:item => 'photo album') else respond_with @photo_album end end |