Sha256: 1c91eee0ca3fe1a32e4629de253ff9456089ab59b7d2e0f55b3fa61719bc0e84

Contents?: true

Size: 574 Bytes

Versions: 9

Compression:

Stored size: 574 Bytes

Contents

require_dependency "ishapi/application_controller"
module Ishapi
  class GalleriesController < ApplicationController

    def index
      @galleries = Gallery.all
      authorize! :index, Gallery
      if params[:cityname]
        city = City.find_by :cityname => params[:cityname]
        @galleries = @galleries.where( :city => city )
      end
      @galleries = @galleries.page( params[:galleries_page] ).per( 10 )
    end

    def show
      @gallery = ::Gallery.unscoped.find_by :galleryname => params[:galleryname]
      authorize! :show, @gallery
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ishapi-0.1.8.55 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.54 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.53 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.52 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.49 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.48 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.47 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.46 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.45 app/controllers/ishapi/galleries_controller.rb