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