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

Version Path
ishapi-0.1.8.194 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.193 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.192 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.191 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.190 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.189 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.188 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.187 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.185 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.184 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.183 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.182 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.181 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.180 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.178 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.177 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.176 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.175 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.174 app/controllers/ishapi/events_controller.rb
ishapi-0.1.8.173 app/controllers/ishapi/events_controller.rb