rails-image-post-solution 0.1.4 → 0.1.6

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: b625a47080961aad101e70eddcb541dfdb006342fe19cf2b95c9fb7243ecf9b9
4
- data.tar.gz: 427c9d081155769b7888f130bc34b55da141f530b8d5e748082e60e9c32a4a03
3
+ metadata.gz: 9509b647fc4754ab678ba3ec61d981770dd74a3a004d101b5199f63b0b25ad47
4
+ data.tar.gz: 3255a0da4ea9db4b32560abfac145a5b018ab367d830550c84b92a4b805e60c3
5
5
  SHA512:
6
- metadata.gz: 31bfcdcc9416bc822547d27b690c0713a6d717f8a3443e2a758d330c52efd31f9a9b45024662f6e3561c889d8b0eb8834fa6a52f3fcbc4ac701c5447cbfc73f5
7
- data.tar.gz: 4821a741b4fef32d874c171133d3783c165c67a9a00a364114de0c4ad69e674779b13524a95dbe185bfbb927762a85f7079c0b665bb6176ceadaf71c68cb2373
6
+ metadata.gz: 363365fb52b8b43344d2d2850ca13f684bc401bb3991aac6da46335213a201e9b57087a3ef4f1b0daaee0fe1bbb8127955cb6fe43f2edc4234f7bb605c5fc473
7
+ data.tar.gz: b0a6e9a4bfc78842ad43ee56856985a60943d9c25d90bed2b885b1f241bb7290374d20dbde13725ccf99c5ec07b67632c767565386348a8e6f8da170db4d4357
data/README.md CHANGED
@@ -298,6 +298,20 @@ end
298
298
 
299
299
  The engine provides the following routes when mounted at `/moderation`:
300
300
 
301
+ ### Using Route Helpers
302
+
303
+ The engine automatically makes route helpers available in your application. You can use them directly:
304
+
305
+ ```ruby
306
+ # In your views or controllers
307
+ admin_image_reports_path # => /moderation/admin/image_reports
308
+ admin_user_path(@user) # => /moderation/admin/users/:id
309
+ image_reports_path # => /moderation/image_reports
310
+
311
+ # Or use the engine namespace explicitly
312
+ rails_image_post_solution.admin_image_reports_path
313
+ ```
314
+
301
315
  ### User-Facing Routes
302
316
 
303
317
  ```
@@ -18,5 +18,17 @@ module RailsImagePostSolution
18
18
  initializer "rails_image_post_solution.assets" do |app|
19
19
  app.config.assets.paths << root.join("app/assets")
20
20
  end
21
+
22
+ # Make engine route helpers available in the main application
23
+ initializer "rails_image_post_solution.helpers" do
24
+ ActiveSupport.on_load(:action_controller_base) do
25
+ include RailsImagePostSolution::Engine.routes.url_helpers
26
+ helper RailsImagePostSolution::Engine.routes.url_helpers
27
+ end
28
+
29
+ ActiveSupport.on_load(:action_view) do
30
+ include RailsImagePostSolution::Engine.routes.url_helpers
31
+ end
32
+ end
21
33
  end
22
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsImagePostSolution
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-image-post-solution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler