five-two-nw-olivander 0.1.2.26 → 0.1.2.27
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 575201e4ba97a06d33425fffb69b3550f2c3fddc58e1ccb030a827914cbd65f0
|
4
|
+
data.tar.gz: e1570ff90c9a44764ea6c8e5d8b269d6482377c47010c36475eeabbbfcb5e1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97a5958aab8927d392183d9aea8b193491bf346af4a65fadc9faa96a4f57a54478e7a7247060ca0ec84a25fe7b09dd0c063001f5ae8dc50f59bdb03e86b1475a
|
7
|
+
data.tar.gz: 3c237985f2aee2131498cbf501734aa9d517f7827eee5d23fb0549452c0d96aadd2913f66269e937a0ae9b5280654c39d3bd179f203b7f42ea7af49584481b7d
|
@@ -40,12 +40,14 @@ module Olivander
|
|
40
40
|
bulk_actions_col
|
41
41
|
column_attributes.each do |key|
|
42
42
|
label = field_label_for(klazz, key)
|
43
|
-
sym = key.gsub('_id', '')
|
43
|
+
sym = key.gsub('_id', '') #.to_sym
|
44
44
|
visible = show.include?(key) || !(default_hidden.include?(key) || hide.include?(key))
|
45
45
|
if link_path.present? && sym == :id
|
46
46
|
link_col sym, link_path, :id, visible: visible
|
47
47
|
elsif link_path.present? && sym == :name
|
48
48
|
link_col sym, link_path, :id, visible: visible
|
49
|
+
elsif sym.include?('.')
|
50
|
+
col sym, visible: visible, label: label
|
49
51
|
else
|
50
52
|
col sym, visible: visible, label: label
|
51
53
|
end
|
@@ -79,7 +79,8 @@ module Olivander
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def field_label_for(resource_class, sym)
|
82
|
-
|
82
|
+
sym_s = sym.to_s.gsub('.', '_')
|
83
|
+
i18n_key = "activerecord.attributes.#{resource_class.name.underscore}.#{sym_s}"
|
83
84
|
return I18n.t(i18n_key) if I18n.exists?(i18n_key)
|
84
85
|
|
85
86
|
sym.to_s.titleize
|
@@ -130,7 +131,7 @@ module Olivander
|
|
130
131
|
key
|
131
132
|
end
|
132
133
|
end
|
133
|
-
|
134
|
+
|
134
135
|
def flash_icon key
|
135
136
|
case key
|
136
137
|
when "error"
|
@@ -144,6 +145,6 @@ module Olivander
|
|
144
145
|
else
|
145
146
|
"fas fa-question-circle"
|
146
147
|
end
|
147
|
-
end
|
148
|
+
end
|
148
149
|
end
|
149
150
|
end
|
data/lib/olivander/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: five-two-nw-olivander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.2.
|
4
|
+
version: 0.1.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|