ishapi 0.1.8.41 → 0.1.8.42
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 +4 -4
- data/app/controllers/ishapi/tags_controller.rb +24 -0
- data/app/models/ishapi/ability.rb +5 -0
- data/app/views/ishapi/tags/index.jbuilder +11 -0
- data/app/views/ishapi/tags/show.jbuilder +18 -0
- data/config/routes.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50478dc9ef74f07d9e55743549eae13b214a832a
|
4
|
+
data.tar.gz: 8186fe6dd4bf00b270bedea220a2835292375e4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84ba91222819c74653acfa87e3b57a9b47e43386812c98749b5bdcd797d4fc6f07958681ca05a2528ade63153abc84ea85094ab9066c3a5c619cb46ebb9e6269
|
7
|
+
data.tar.gz: 89fa5037cc9636179c766425aa036e8cb9f5ee85dc1fa4f96a28c16c66c5256aaeae886ccda861d9184b70f34cf2ba8a40b3509a213962a2c62585446ba7ba6c
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
module Ishapi
|
3
|
+
class TagsController < ApplicationController
|
4
|
+
|
5
|
+
def index
|
6
|
+
authorize! :index, Tag
|
7
|
+
@tags = Tag.all
|
8
|
+
if params[:domain]
|
9
|
+
@site = Site.find_by( :domain => params[:domain], :lang => :en )
|
10
|
+
@tags = @tags.where( :site => @site )
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def show
|
15
|
+
begin
|
16
|
+
@tag = Tag.find_by( :name_seo => params[:tagname] )
|
17
|
+
rescue Mongoid::Errors::DocumentNotFound
|
18
|
+
@tag = Tag.find params[:tagname]
|
19
|
+
end
|
20
|
+
authorize! :show, @tag
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
# ishapi / tags / show
|
3
|
+
|
4
|
+
json.id @tag.id.to_s
|
5
|
+
json.name @tag.name
|
6
|
+
json.name_seo @tag.name_seo
|
7
|
+
|
8
|
+
json.videos do
|
9
|
+
json.array! @tag.videos
|
10
|
+
end
|
11
|
+
|
12
|
+
json.reports do
|
13
|
+
json.array! @tag.reports
|
14
|
+
end
|
15
|
+
|
16
|
+
json.galleries do
|
17
|
+
json.array! @tag.galleries
|
18
|
+
end
|
data/config/routes.rb
CHANGED
@@ -30,6 +30,9 @@ Ishapi::Engine.routes.draw do
|
|
30
30
|
get 'sites/view/:domain/newsitems/:newsitems_page', :to => 'newsitems#index', :constraints => { :domain => /[^\/]+/ }
|
31
31
|
get 'sites/view/:domain/reports', :to => 'reports#index', :constraints => { :domain => /[^\/]+/ }
|
32
32
|
get 'sites/view/:domain/reports/page/:reports_page', :to => 'reports#index', :constraints => { :domain => /[^\/]+/ }
|
33
|
+
get 'sites/view/:domain/tags', :to => 'tags#index', :constraints => { :domain => /[^\/]+/ }
|
34
|
+
|
35
|
+
get 'tags/view/:tagname', :to => 'tags#show'
|
33
36
|
|
34
37
|
post 'users/fb_sign_in', :to => 'users#fb_sign_in'
|
35
38
|
post 'users/profile', :to => 'users#show'
|
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.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- app/controllers/ishapi/reports_controller.rb~
|
187
187
|
- app/controllers/ishapi/sites_controller.rb
|
188
188
|
- app/controllers/ishapi/sites_controller.rb~
|
189
|
+
- app/controllers/ishapi/tags_controller.rb
|
189
190
|
- app/controllers/ishapi/users_controller.rb
|
190
191
|
- app/controllers/ishapi/users_controller.rb~
|
191
192
|
- app/controllers/ishapi/venues_controller.rb
|
@@ -234,6 +235,8 @@ files:
|
|
234
235
|
- app/views/ishapi/reports/show.jbuilder~
|
235
236
|
- app/views/ishapi/sites/show.jbuilder
|
236
237
|
- app/views/ishapi/sites/show.jbuilder~
|
238
|
+
- app/views/ishapi/tags/index.jbuilder
|
239
|
+
- app/views/ishapi/tags/show.jbuilder
|
237
240
|
- app/views/ishapi/users/_index.jbuilder
|
238
241
|
- app/views/ishapi/users/_index.jbuilder~
|
239
242
|
- app/views/ishapi/users/show.jbuilder
|