rails-image-post-solution 0.1.22 → 0.1.24
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f32f75fd07e37c7c16a35a6dd5208b35d38d21e386105ae67d49a716c986e1d7
|
|
4
|
+
data.tar.gz: b96305b583f3b91320c3bd1b59f821f291ab6760dccab9a462bd5a7a36ac3488
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: add145b850e52bfc3299b9b4c1ffb4f2b565fbc5d8ba62d318ff7bd2b1bfaa742da0fdd7d2c421fdbc9bbedea35b58f469fac6d7d1ccc5d01da253590b019cbe
|
|
7
|
+
data.tar.gz: 39bcaf22938556e816ab652f4aceec203d0670a03bc8ad11a0bbf0d4db1c600247f7d135f06337bc2cb355c1ee021c26cde0cbdb2701f2800e95054aa633b995
|
|
@@ -31,6 +31,15 @@ module RailsImagePostSolution
|
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
# Ensure default_url_options includes locale
|
|
35
|
+
def default_url_options
|
|
36
|
+
if defined?(super)
|
|
37
|
+
super.merge(locale: I18n.locale)
|
|
38
|
+
else
|
|
39
|
+
{ locale: I18n.locale }
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
34
43
|
private
|
|
35
44
|
|
|
36
45
|
def add_engine_view_path
|
data/config/routes.rb
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
RailsImagePostSolution::Engine.routes.draw do
|
|
4
|
-
#
|
|
5
|
-
|
|
4
|
+
# Support optional locale parameter to match host application's routing
|
|
5
|
+
scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
|
|
6
|
+
# User-facing report API
|
|
7
|
+
resources :image_reports, only: [ :create ]
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
# Admin dashboard (engine controllers)
|
|
10
|
+
namespace :admin do
|
|
11
|
+
# Image reports management
|
|
12
|
+
resources :image_reports, only: %i[index show] do
|
|
13
|
+
member do
|
|
14
|
+
patch :confirm
|
|
15
|
+
patch :dismiss
|
|
16
|
+
end
|
|
14
17
|
end
|
|
15
|
-
end
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
# User management
|
|
20
|
+
resources :users, only: %i[index show] do
|
|
21
|
+
member do
|
|
22
|
+
post :suspend
|
|
23
|
+
post :unsuspend
|
|
24
|
+
post :ban
|
|
25
|
+
post :unban
|
|
26
|
+
end
|
|
24
27
|
end
|
|
25
|
-
end
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
# Frozen posts management
|
|
30
|
+
resources :frozen_posts, only: [ :index ] do
|
|
31
|
+
collection do
|
|
32
|
+
post "unfreeze_stage/:id", to: "frozen_posts#unfreeze_stage", as: :unfreeze_stage
|
|
33
|
+
post "unfreeze_comment/:id", to: "frozen_posts#unfreeze_comment", as: :unfreeze_comment
|
|
34
|
+
post "permanent_freeze_stage/:id", to: "frozen_posts#permanent_freeze_stage", as: :permanent_freeze_stage
|
|
35
|
+
post "permanent_freeze_comment/:id", to: "frozen_posts#permanent_freeze_comment", as: :permanent_freeze_comment
|
|
36
|
+
delete "destroy_stage/:id", to: "frozen_posts#destroy_stage", as: :destroy_stage
|
|
37
|
+
delete "destroy_comment/:id", to: "frozen_posts#destroy_comment", as: :destroy_comment
|
|
38
|
+
end
|
|
36
39
|
end
|
|
37
40
|
end
|
|
38
41
|
end
|