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