Sha256: ae959fd6e55d5494145f255e309e4918073043d2601fabc316d9378dd0d3a14d

Contents?: true

Size: 394 Bytes

Versions: 4

Compression:

Stored size: 394 Bytes

Contents

class SofaGallery::GalleriesController < ApplicationController
  
  def index
    @galleries = SofaGallery::Gallery.all
  rescue ActiveRecord::RecordNotFound
    render :text => 'Gallery not found', :status => 404
  end
  
  def show
    @gallery = SofaGallery::Gallery.find(params[:id])
  rescue ActiveRecord::RecordNotFound
    render :text => 'Gallery not found', :status => 404
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sofa_gallery-0.0.6 app/controllers/sofa_gallery/galleries_controller.rb
sofa_gallery-0.0.5 app/controllers/sofa_gallery/galleries_controller.rb
sofa_gallery-0.0.4 app/controllers/sofa_gallery/galleries_controller.rb
sofa_gallery-0.0.3 app/controllers/sofa_gallery/galleries_controller.rb