Sha256: 19373482392831040b4f5d4962fbedb80ce6b9786da46c401cb0c9c323f0bdc2
Contents?: true
Size: 539 Bytes
Versions: 127
Compression:
Stored size: 539 Bytes
Contents
require_dependency "ishapi/application_controller" module Ishapi class EventsController < ApplicationController def index @events = Event.all authorize! :index, Event if params[:cityname] city = City.find_by :cityname => params[:cityname] @events = @events.where( :city => city ) end @events = @events.page( params[:events_page] ).per( 10 ) end def show @event = ::Event.unscoped.find_by :eventname => params[:eventname] authorize! :show, @event end end end
Version data entries
127 entries across 127 versions & 1 rubygems