administrate-field-active_storage 0.3.4 → 0.3.5

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: d5f396ea1832dd7c8848f9017c8b613fb8db660a180756a4e7e3ef1c3ca91a3b
4
- data.tar.gz: 0e87c2670d021f05baaef9e8a38fb93ba142da11d4bbebdb72b971a9a716f9a0
3
+ metadata.gz: eeae1cb2ea6a2ed7534c917f87c06d73ff22abbb03e299af2253f65abc7f1490
4
+ data.tar.gz: e1b8b00ec8cf58cf084fd916e0afee627110ea991d1fe31a27b617ef2a8919df
5
5
  SHA512:
6
- metadata.gz: 1735bce16f591be4615fe9fa817b51b73c4df8a725d77a2b3b1b92b746a7bd515ab5e3df3b51814932d26a11f0dae6c545a6e582f32c08a947c1913fb0c8de13
7
- data.tar.gz: 5d1654ccac549cee8fbbba1ded8cb15899cf05922aa083f3463b7207e3d8cee5e812f7b696bd7b999ba5b27608ac569bb23310702510092ada71ee7f4db5ca0f
6
+ metadata.gz: aeec55b49785338dfecebeb33cce2a7da199f3fe0e9c5cb56c9684a069bb0cbd555818d26384c10160a46a4dd63473f759ea255a8a7f6e88d9a8590e1bb3a393
7
+ data.tar.gz: c8950a969fb5503ab53a7cda2a59badd286f0ac4d1166ff0d7e8b42d4b279ad1c0c65ee97ecc28cdaf5bde1cad52d087d10bd4aab5a811fe20b3d7bcf04808d8
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "administrate-field-active_storage"
5
- gem.version = "0.3.4"
5
+ gem.version = "0.3.5"
6
6
  gem.authors = ["Hamad AlGhanim"]
7
7
  gem.email = ["hamadyalghanim@gmail.com"]
8
8
  gem.homepage = "https://github.com/Dreamersoul/administrate-field-active_storage"
@@ -25,7 +25,7 @@ By default, the attribute is rendered as an image tag.
25
25
  <%= render partial: 'fields/active_storage/preview',
26
26
  locals: {
27
27
  field: field,
28
- attachment: field.attachments[0],
28
+ attachment: field.data,
29
29
  size: field.index_preview_size
30
30
  } %>
31
31
  <% end %>
@@ -36,7 +36,7 @@ controlled via a boolean local variable.
36
36
  <% if field.destroy_url.present? %>
37
37
  <% destroy_url = field.destroy_url.call(namespace, field.data.record, attachment) %>
38
38
  <div>
39
- <%= link_to 'Remove', destroy_url, method: :delete, class: 'remove-attachment-link' %>
39
+ <%= link_to 'Remove', destroy_url, method: :delete, class: 'remove-attachment-link', data: { confirm: t("administrate.actions.confirm") } %>
40
40
  </div>
41
41
  <hr>
42
42
  <% end %>
@@ -16,7 +16,7 @@ module Administrate
16
16
  end
17
17
 
18
18
  def index_display_count?
19
- options.fetch(:index_display_count) { attachments.present? && attachments.count != 1 }
19
+ options.fetch(:index_display_count) { attached? && attachments.count != 1 }
20
20
  end
21
21
 
22
22
  def show_display_preview?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-active_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamad AlGhanim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-30 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate