ishapi 0.1.8.17 → 0.1.8.18
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/galleries_controller.rb +9 -0
- data/app/views/ishapi/cities/show.jbuilder +1 -0
- data/app/views/ishapi/galleries/index.jbuilder +15 -0
- data/app/views/ishapi/galleries/index.jbuilder~ +2 -0
- data/app/views/ishapi/reports/show.jbuilder +6 -0
- data/config/routes.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44cdbd0807f0ade66812f732c0c5c0ba86e455f8
|
4
|
+
data.tar.gz: 12b037c0dc04457f45b44e3df35e7698a14bef5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb84c18de49f30520f1e004e1c84d49be89f966e549ec70c204eac982d75a4bcf81de7abcafeec51af30abe13cc5da339946c658260d79068f91e2911a5b139
|
7
|
+
data.tar.gz: 78991d63c24eef1938d3d071bb4bd83042a699b8afc9355293238e1655cb1371c4b3aab6d531e97afe7abe881b4dd5ecb5da0eba8a3749b7c800e7352e678b7b
|
@@ -2,6 +2,15 @@ require_dependency "ishapi/application_controller"
|
|
2
2
|
module Ishapi
|
3
3
|
class GalleriesController < ApplicationController
|
4
4
|
|
5
|
+
def index
|
6
|
+
@galleries = Gallery.all
|
7
|
+
authorize! :index, Gallery
|
8
|
+
if params[:cityname]
|
9
|
+
city = City.find_by :cityname => params[:cityname]
|
10
|
+
@galleries = @galleries.where( :city => city )
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
5
14
|
def show
|
6
15
|
@gallery = ::Gallery.unscoped.find_by :galleryname => params[:galleryname]
|
7
16
|
authorize! :show, @gallery
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# ishapi / galleries / index
|
4
|
+
#
|
5
|
+
|
6
|
+
json.array! @galleries do |gallery|
|
7
|
+
json.id gallery.id.to_s
|
8
|
+
json.name gallery.name
|
9
|
+
json.galleryname gallery.galleryname
|
10
|
+
json.username gallery.username
|
11
|
+
json.cityname gallery.city.name if gallery.city
|
12
|
+
json.tagname gallery.tag.name_seo if gallery.tag
|
13
|
+
json.venuename gallery.venue.name if gallery.venue
|
14
|
+
end
|
15
|
+
|
@@ -10,5 +10,11 @@ json.cache! key do
|
|
10
10
|
json.name @report.name
|
11
11
|
json.reportname @report.name_seo
|
12
12
|
json.description @report.descr
|
13
|
+
|
14
|
+
# @TODO: move this to meta
|
15
|
+
json.cityname @report.city.cityname if @report.city
|
16
|
+
json.username @report.username
|
17
|
+
json.tagname @report.tag.name_seo if @report.tag
|
18
|
+
|
13
19
|
end
|
14
20
|
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -167,6 +167,8 @@ files:
|
|
167
167
|
- app/views/ishapi/galleries/_index.jbuilder~
|
168
168
|
- app/views/ishapi/galleries/_show.jbuilder
|
169
169
|
- app/views/ishapi/galleries/_show.jbuilder~
|
170
|
+
- app/views/ishapi/galleries/index.jbuilder
|
171
|
+
- app/views/ishapi/galleries/index.jbuilder~
|
170
172
|
- app/views/ishapi/galleries/show.jbuilder
|
171
173
|
- app/views/ishapi/galleries/show.jbuilder~
|
172
174
|
- app/views/ishapi/my/reports/index.jbuilder
|