katalyst-koi 4.5.6 → 4.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ada22c3c8efe297efe34d45f3adb4b1000753095fc5a822e0381f39d90c04436
4
- data.tar.gz: 338f2c71ca31a9e8a825aed39a34ed59d63f7ce5dd8e31beca9abfa7587bae01
3
+ metadata.gz: 13cd00ba07e90a830f3a858db1fdd1f22181bf68448b0716441b66c2ce17eb84
4
+ data.tar.gz: 96bbf769605e6b8b4091f500e475cdb033039e037b784c7469a9ce52ade9866c
5
5
  SHA512:
6
- metadata.gz: 1cbce2dad572261f3d65f47f1fc2ef2e4fc97c28eb9c535b5fcc166b06416dd01e98f8f17d0d0f4dd08ff7cce06646e2e0ba811e5d674868c8d4c3ef2b34a1f0
7
- data.tar.gz: 7f1ec66083fefbf508c18fb053bcfb714eca35e6e773d0a39ce083762ed014f711a1856d0df028af8141a306f80582baa7eeec5d18bce93e8d44fc9793a4715a
6
+ metadata.gz: b8c065374fc75587b31288078435eb2e9ad801a3e1dbf19984868d4377f0e6cf31b8e992c9b2f7a0b6761669506087c08d742faebe31a79356d6fe869c67c921
7
+ data.tar.gz: b159be789bf941acab6882e460ccf85858b4a5016f10195d4351b2050eb33260ae1835e404a43cee3c763a68af4a1321d017e879a7fe56225d608a9e0a58b945
@@ -14,9 +14,9 @@ module Koi
14
14
  end
15
15
 
16
16
  def representation
17
- if value.try(:variable?) && named_variant.present?
18
- image_tag(value.variant(@variant))
19
- elsif value.try(:attached?)
17
+ if raw_value.try(:variable?) && named_variant.present?
18
+ image_tag(raw_value.variant(@variant))
19
+ elsif raw_value.try(:attached?)
20
20
  filename.to_s
21
21
  else
22
22
  ""
@@ -24,7 +24,7 @@ module Koi
24
24
  end
25
25
 
26
26
  def filename
27
- value.blob.filename
27
+ raw_value.blob.filename
28
28
  end
29
29
 
30
30
  # Utility for accessing the path Rails provides for retrieving the
@@ -33,14 +33,14 @@ module Koi
33
33
  # <%= link_to "Download", cell.internal_path %>
34
34
  # <% end %>
35
35
  def internal_path
36
- rails_blob_path(value, disposition: :attachment)
36
+ rails_blob_path(raw_value, disposition: :attachment)
37
37
  end
38
38
 
39
39
  private
40
40
 
41
41
  # Find the reflective variant by name (i.e. :thumb by default)
42
42
  def named_variant
43
- value.record.attachment_reflections[@attribute.to_s].named_variants[@variant.to_sym]
43
+ @model.attachment_reflections[@attribute.to_s].named_variants[@variant.to_sym]
44
44
  end
45
45
  end
46
46
  end
@@ -220,7 +220,7 @@ module Koi
220
220
 
221
221
  # Find the reflective variant by name (i.e. :thumb by default)
222
222
  def named_variant
223
- value.record.attachment_reflections[@attribute.to_s].named_variants[@variant.to_sym]
223
+ object.attachment_reflections[@attribute.to_s].named_variants[@variant.to_sym]
224
224
  end
225
225
  end
226
226
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-koi
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.6
4
+ version: 4.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive