rails-image-post-solution 0.1.5 → 0.1.7
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/lib/rails_image_post_solution/engine.rb +20 -22
- data/lib/rails_image_post_solution/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5177474ff11773b95901978d5663140c9220f9264eb5069df3fd1a0d21135c4f
|
|
4
|
+
data.tar.gz: 9e4320b3daf678da0dd8981ca6d486c921fe03cb856b59dfe0b069c6fc0b77d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc7ed57192f84ab4506bece69cac84bed39853cd64231c4378941938531b5fcaf6bcad382d552b8ec8c04df4b6841b8e34f2bb4550b48c08865a2a399eebfc93
|
|
7
|
+
data.tar.gz: cca2b3a38545119616aef194c6e949901a7fe63d874aa398f0c3d939e0817cf09ff8007d52e0ef1bc4748921cd0b9d267b6f660acc046dc28e5e915f8d0b0f79
|
|
@@ -6,6 +6,19 @@ module RailsImagePostSolution
|
|
|
6
6
|
class Engine < ::Rails::Engine
|
|
7
7
|
isolate_namespace RailsImagePostSolution
|
|
8
8
|
|
|
9
|
+
# Explicitly set engine root
|
|
10
|
+
config.root = File.expand_path('../..', __dir__)
|
|
11
|
+
|
|
12
|
+
# Load routes when engine is initialized
|
|
13
|
+
config.after_initialize do
|
|
14
|
+
routes_path = RailsImagePostSolution::Engine.root.join("config", "routes.rb")
|
|
15
|
+
if File.exist?(routes_path)
|
|
16
|
+
RailsImagePostSolution::Engine.class_eval do
|
|
17
|
+
load routes_path
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
9
22
|
config.generators do |g|
|
|
10
23
|
g.test_framework :rspec
|
|
11
24
|
g.fixture_replacement :factory_bot
|
|
@@ -20,29 +33,14 @@ module RailsImagePostSolution
|
|
|
20
33
|
end
|
|
21
34
|
|
|
22
35
|
# Make engine route helpers available in the main application
|
|
23
|
-
initializer "rails_image_post_solution.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:admin_image_report_path, :admin_image_report_url,
|
|
29
|
-
:confirm_admin_image_report_path, :confirm_admin_image_report_url,
|
|
30
|
-
:dismiss_admin_image_report_path, :dismiss_admin_image_report_url,
|
|
31
|
-
:admin_users_path, :admin_users_url,
|
|
32
|
-
:admin_user_path, :admin_user_url,
|
|
33
|
-
:suspend_admin_user_path, :suspend_admin_user_url,
|
|
34
|
-
:unsuspend_admin_user_path, :unsuspend_admin_user_url,
|
|
35
|
-
:ban_admin_user_path, :ban_admin_user_url,
|
|
36
|
-
:unban_admin_user_path, :unban_admin_user_url,
|
|
37
|
-
:admin_frozen_posts_path, :admin_frozen_posts_url,
|
|
38
|
-
:image_reports_path, :image_reports_url,
|
|
39
|
-
to: RailsImagePostSolution::Engine.routes.url_helpers
|
|
40
|
-
end
|
|
36
|
+
initializer "rails_image_post_solution.helpers" do
|
|
37
|
+
ActiveSupport.on_load(:action_controller_base) do
|
|
38
|
+
include RailsImagePostSolution::Engine.routes.url_helpers
|
|
39
|
+
helper RailsImagePostSolution::Engine.routes.url_helpers
|
|
40
|
+
end
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
helper RailsImagePostSolution::Engine.routes.url_helpers
|
|
45
|
-
end
|
|
42
|
+
ActiveSupport.on_load(:action_view) do
|
|
43
|
+
include RailsImagePostSolution::Engine.routes.url_helpers
|
|
46
44
|
end
|
|
47
45
|
end
|
|
48
46
|
end
|