ishapi 0.1.8.52 → 0.1.8.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ishapi/events_controller.rb +21 -0
- data/app/models/ishapi/ability.rb +2 -0
- data/app/views/ishapi/events/show.jbuilder +11 -0
- data/config/routes.rb +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b62f4c9e48fbdace0290ac3548dea0ee7c95e0d2
|
4
|
+
data.tar.gz: 72e101241e6e8be73e6b3c5adcfe9ed0f993319f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa6eed78a9ba44ae37032f9b42fd4a5fe9efb2933346c87319fee34a3a1f2cc4fa4ac25763f8065b27f47bad24e5ce99c06319259f02e8c39cca841094213de
|
7
|
+
data.tar.gz: f93bfcf69162647fc2a92d74d1cca173d10e44f1c3622dc40e429cef460ff38ba931a6c360c8470b192360a9e03d6e8de1c8dbc7804b39d5bee0d283513f5993
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
module Ishapi
|
3
|
+
class EventsController < ApplicationController
|
4
|
+
|
5
|
+
def index
|
6
|
+
@events = Event.all
|
7
|
+
authorize! :index, Event
|
8
|
+
if params[:cityname]
|
9
|
+
city = City.find_by :cityname => params[:cityname]
|
10
|
+
@events = @events.where( :city => city )
|
11
|
+
end
|
12
|
+
@events = @events.page( params[:events_page] ).per( 10 )
|
13
|
+
end
|
14
|
+
|
15
|
+
def show
|
16
|
+
@event = ::Event.unscoped.find_by :eventname => params[:eventname]
|
17
|
+
authorize! :show, @event
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- app/controllers/ishapi/articles_controller.rb
|
173
173
|
- app/controllers/ishapi/cities_controller.rb
|
174
174
|
- app/controllers/ishapi/cities_controller.rb~
|
175
|
+
- app/controllers/ishapi/events_controller.rb
|
175
176
|
- app/controllers/ishapi/galleries_controller.rb
|
176
177
|
- app/controllers/ishapi/galleries_controller.rb~
|
177
178
|
- app/controllers/ishapi/invoices_controller.rb
|
@@ -210,6 +211,7 @@ files:
|
|
210
211
|
- app/views/ishapi/cities/show.jbuilder
|
211
212
|
- app/views/ishapi/cities/show.jbuilder~
|
212
213
|
- app/views/ishapi/events/_index.jbuilder
|
214
|
+
- app/views/ishapi/events/show.jbuilder
|
213
215
|
- app/views/ishapi/features/_index.jbuilder
|
214
216
|
- app/views/ishapi/galleries/_index.jbuilder
|
215
217
|
- app/views/ishapi/galleries/_index.jbuilder~
|