zutils 0.5.0 → 0.5.1

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: 2e6e510b2c2aa55be7f025c9443ae9237a501291fd2bf77204990c48ba99afe7
4
- data.tar.gz: a4331ab62d5d9c9328e361188955e6564de1ebd4f53a3492b7ccaff02be2fd6d
3
+ metadata.gz: 2fb99d41fe0ffcf9bc92c4af427ff166a3b51aee5d16a513bb61786af245ab8b
4
+ data.tar.gz: deecc20864d40807f2e5613c90752fa88cba0ec890a7342c66735e41595220c8
5
5
  SHA512:
6
- metadata.gz: 15d9ebfd528ff276762a3af5d196e615535100feee88d6219708f04cbadaa6ce05bccaf66c4094569cbce0c1f198d5a44598717dd25e132b087775a937c0b980
7
- data.tar.gz: 740c9e8ad0f8bbebd9063d999f082e4470be80132751993dd48991a312fe9e8ef4664e7453eae4cec2b79b7a1b220e2bf68c30c1af8f25c707f46816f57a207f
6
+ metadata.gz: 7dcd4e480c21b92aa23014b0cc5f125ceddc18bc4d15fe3f818eebf5fca147389f0deb928b4e107824803cee5a82fe86503cb929aae181d2ebc5a37640e7619a
7
+ data.tar.gz: 97042c9f956abefaab9761d9bd9ce587598b2e2f0be86e3ee9b9f00fa944b7eeac5244f00fc502d54e2c9fac5d18b911cbc24b4d2f6ee67e3a5b5cd055728001
@@ -63,8 +63,10 @@
63
63
  <%=l object.send(column) %>
64
64
  <% elsif object.send(column).respond_to? 'attached?' %>
65
65
  <% if object.send(column).class == ActiveStorage::Attached::One %>
66
- <%= link_to rails_blob_path(object.send(column)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
67
- <i class="fa fa-file-o"></i> Arquivo
66
+ <% if object.send(column).attached? %>
67
+ <%= link_to rails_blob_path(object.send(column)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
68
+ <i class="fa fa-file-o"></i> Arquivo
69
+ <% end %>
68
70
  <% end %>
69
71
  <% end %>
70
72
  <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
@@ -84,8 +84,10 @@
84
84
  <%=l object.send(column) %>
85
85
  <% elsif object.send(column).respond_to? 'attached?' %>
86
86
  <% if object.send(column).class == ActiveStorage::Attached::One %>
87
- <%= link_to rails_blob_path(object.send(column)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
88
- <i class="fa fa-file-o"></i> Arquivo
87
+ <% if object.send(column).attached? %>
88
+ <%= link_to rails_blob_path(object.send(column)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
89
+ <i class="fa fa-file-o"></i> Arquivo
90
+ <% end %>
89
91
  <% end %>
90
92
  <% end %>
91
93
  <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %>
@@ -195,8 +197,10 @@
195
197
  <%=l r.send(v) %>
196
198
  <% elsif r.send(v).respond_to? 'attached?' %>
197
199
  <% if r.send(v).class == ActiveStorage::Attached::One %>
198
- <%= link_to rails_blob_path(r.send(v)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
199
- <i class="fa fa-file-o"></i> Arquivo
200
+ <% if r.send(v).attached? %>
201
+ <%= link_to rails_blob_path(r.send(v)), class: "btn btn-#{box_class} btn-xs", target: '_blank' do %>
202
+ <i class="fa fa-file-o"></i> Arquivo
203
+ <% end %>
200
204
  <% end %>
201
205
  <% end %>
202
206
  <% elsif /_id$/ =~ v && r.respond_to?(v.split('_id')[0]) %>
@@ -1,3 +1,3 @@
1
1
  module Zutils
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-02 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.0.1
102
+ rubygems_version: 3.0.3
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Utilidades gerais para aplicações rails