rails-image-post-solution 0.1.17 → 0.1.19

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: d56fbbd2235b0e89af7fd44e40cd35cf33fb030a59b227ec1cda26034c697c8b
4
- data.tar.gz: f7be9d6e8f3705eb302f20ed724eec94c8453723360f0948b537b0e854e492d8
3
+ metadata.gz: da2ff92d037627dc03bcd5d5bc7b7e7a8889552ed233fbe7bfc84b93b871147a
4
+ data.tar.gz: bad66fcc11a57977c1f0bdb8028802d59e27463471fb1853d6a9dff0b258afdb
5
5
  SHA512:
6
- metadata.gz: 633e2886940090d67acb8a3f6997e80cbb20b1c6c7b723ff217779ecf372d270fd3c36ec3c05f4aff3db6403179882c351cd232b2f8c540f48f536c2d4f785a7
7
- data.tar.gz: 1b017f59cd65e14af3a95e075439d88a129dfa8da68452645582a6d9d6428efa0418b41c1bb6159c6ec51022b9c3f07d12c83f1104dc430ec7883beb35e81818
6
+ metadata.gz: 679d7795502d6e18f4916932a16076309056964e3cee8adfec02ee6e2b6f9a54d9130aebb8300d831f0135e2c7b3756e8d041377ef5f504868638e635ada1ad4
7
+ data.tar.gz: 411fbecd9a830f7128c092fed031a055d8e4e844b0433b38a4d052c4f25219fda2d65dc578bb9a17535291c8db0340b85ccdba6f2f71b23f72a14aca1926c665
@@ -5,6 +5,9 @@ module RailsImagePostSolution
5
5
  # Engine's base controller inherits from host application's ApplicationController
6
6
  # This allows the engine to use the host app's authentication methods
7
7
 
8
+ # Prepend engine's view path
9
+ prepend_view_path Engine.root.join("app", "views")
10
+
8
11
  # Override require_login to use main_app routes
9
12
  def require_login
10
13
  unless logged_in?
@@ -54,7 +54,7 @@
54
54
  <tr class="report-row status-<%= report.status %>">
55
55
  <td class="image-cell">
56
56
  <% if report.active_storage_attachment.present? %>
57
- <%= image_tag report.active_storage_attachment.blob, class: "admin-thumbnail", style: "max-width: 100px; max-height: 100px;" %>
57
+ <%= image_tag url_for(report.active_storage_attachment), class: "admin-thumbnail", style: "max-width: 100px; max-height: 100px;" %>
58
58
  <% else %>
59
59
  <span class="text-muted"><%= t('rails_image_post_solution.admin.index.deleted') %></span>
60
60
  <% end %>
@@ -7,7 +7,7 @@
7
7
  <h3><%= t('rails_image_post_solution.admin.show.reported_image') %></h3>
8
8
  <% if @attachment.present? %>
9
9
  <div class="reported-image-container">
10
- <%= image_tag @attachment.blob, class: "reported-image-large", style: "max-width: 800px; max-height: 600px;" %>
10
+ <%= image_tag url_for(@attachment), class: "reported-image-large", style: "max-width: 800px; max-height: 600px;" %>
11
11
  </div>
12
12
  <% else %>
13
13
  <p class="text-muted"><%= t('rails_image_post_solution.admin.show.image_deleted') %></p>
@@ -9,14 +9,18 @@ module RailsImagePostSolution
9
9
  # Explicitly set engine root
10
10
  config.root = File.expand_path("../..", __dir__)
11
11
 
12
- # Add engine's view paths
13
- config.paths["app/views"] << root.join("app/views")
14
-
15
12
  # Eager load engine classes to ensure they're available
16
13
  config.eager_load_paths += %W[
17
14
  #{root}/app/controllers
18
15
  ]
19
16
 
17
+ # Prepend view paths so engine views are found
18
+ initializer "rails_image_post_solution.view_paths" do
19
+ ActiveSupport.on_load(:action_controller) do
20
+ prepend_view_path Engine.root.join("app", "views")
21
+ end
22
+ end
23
+
20
24
  # Load admin module and controllers when app prepares
21
25
  config.to_prepare do
22
26
  # Ensure Admin module is loaded
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsImagePostSolution
4
- VERSION = "0.1.17"
4
+ VERSION = "0.1.19"
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.17
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler