Sha256: bc19978b81ac71d3433fa154d81ffffdd8effbdd4ef911c716ab59dd3e12c23b

Contents?: true

Size: 502 Bytes

Versions: 27

Compression:

Stored size: 502 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
    end

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

  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ishapi-0.1.8.44 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.43 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.42 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.41 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.40 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.39 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.38 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.37 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.36 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.35 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.34 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.33 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.32 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.31 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.30 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.29 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.28 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.27 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.26 app/controllers/ishapi/galleries_controller.rb
ishapi-0.1.8.25 app/controllers/ishapi/galleries_controller.rb