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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd9de6a31c033a184f716a05a36454379fb66860
4
- data.tar.gz: ce211d7218f50a1a57fc7f093f13a1c72911b8d6
3
+ metadata.gz: b62f4c9e48fbdace0290ac3548dea0ee7c95e0d2
4
+ data.tar.gz: 72e101241e6e8be73e6b3c5adcfe9ed0f993319f
5
5
  SHA512:
6
- metadata.gz: abcf3b251846db4b0b48639adae80eeb1ca411c9e0bafc0a267b80d3a92db9bb21538b69454a170dc36e833a8f93fd32029355ca26dc09955e25ae1d905c8ece
7
- data.tar.gz: '071957bbcb204f0b45f4254b0c90eb055262a17774864d42481cb79ec697c1aee4f46fde2251c3ae9830fe4d51974c857cc8ea5fe724dc232c01335f1862de43'
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
@@ -25,6 +25,8 @@ class Ishapi::Ability
25
25
 
26
26
  can [ :index, :show ], City
27
27
 
28
+ can [ :index, :show ], Event
29
+
28
30
  can [ :index ], Gallery
29
31
  can [ :show ], Gallery do |gallery|
30
32
  gallery.is_public
@@ -0,0 +1,11 @@
1
+
2
+ json.event do
3
+ json.name @event.name
4
+ json.date @event.date
5
+ json.eventname @event.eventname
6
+ json.description @event.description
7
+ json.city do
8
+ json.name @event.city.name
9
+ json.cityname @event.city.cityname
10
+ end
11
+ end
@@ -8,6 +8,8 @@ Ishapi::Engine.routes.draw do
8
8
  namespace :co_tailors do
9
9
  end
10
10
 
11
+ get 'events/view/:eventname', :to => 'events#show'
12
+
11
13
  get 'galleries', :to => 'galleries#index'
12
14
  get 'galleries/view/:galleryname', :to => 'galleries#show'
13
15
 
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.52
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~