ishapi 0.1.8.17 → 0.1.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae3828b157640356896379ff1249c5522a5a726e
4
- data.tar.gz: 5207b80b7dff7969088deeefcf658ddb957e54c1
3
+ metadata.gz: 44cdbd0807f0ade66812f732c0c5c0ba86e455f8
4
+ data.tar.gz: 12b037c0dc04457f45b44e3df35e7698a14bef5a
5
5
  SHA512:
6
- metadata.gz: b1f2fd2c999ce138c68f89eb47edaf4390ddd99585ef8e84e0baecd7e34a3ae15c0916ccfedb653365f01aafc46bfee62c6ca79d63d9fe4b570ac8875260a4e8
7
- data.tar.gz: c102ffde5d23f1c224a4620a303a4283a9044fcf0c0345980db429578bf729263c89580e9f71cf26e5b9f91548e1783ba8769251bab8c3400f8844765b21ab74
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
@@ -10,6 +10,7 @@ json.cache! key do
10
10
  json.name @city.name
11
11
  json.cityname @city.cityname
12
12
  json.description @city.description
13
+ json.photo @city.profile_photo.photo.url( :thumb ) if @city.profile_photo
13
14
  json.x @city.x
14
15
  json.y @city.y
15
16
 
@@ -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
+
@@ -0,0 +1,2 @@
1
+
2
+ json.a 'b'
@@ -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
@@ -6,6 +6,7 @@ Ishapi::Engine.routes.draw do
6
6
  get 'cities', :to => 'cities#index'
7
7
  get 'cities/view/:cityname', :to => 'cities#show'
8
8
 
9
+ get 'galleries', :to => 'galleries#index'
9
10
  get 'galleries/view/:galleryname', :to => 'galleries#show'
10
11
 
11
12
  namespace :my do
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.17
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-05 00:00:00.000000000 Z
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