active-list 4.1.7 → 4.1.8
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.
- data/VERSION +1 -1
- data/lib/active-list/columns/data_column.rb +6 -6
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.1.
|
1
|
+
4.1.8
|
@@ -81,10 +81,8 @@ module ActiveList
|
|
81
81
|
datum = "(#{datum}.nil? ? '' : ::I18n.translate('countries.'+#{datum}))"
|
82
82
|
elsif @name==:language and self.datatype == :string and self.limit <= 8
|
83
83
|
datum = "(#{datum}.nil? ? '' : ::I18n.translate('languages.'+#{datum}))"
|
84
|
-
elsif self.
|
85
|
-
|
86
|
-
datum = "(#{datum}.nil? ? '' : #{datum}.text)"
|
87
|
-
end
|
84
|
+
elsif self.enumerize?
|
85
|
+
datum = "(#{datum}.nil? ? '' : #{datum}.text)"
|
88
86
|
end
|
89
87
|
return datum
|
90
88
|
end
|
@@ -97,8 +95,10 @@ module ActiveList
|
|
97
95
|
|
98
96
|
def enumerize?
|
99
97
|
if self.table.model.respond_to?(@name) and !@options[:through]
|
100
|
-
if self.table.model.
|
101
|
-
|
98
|
+
if self.table.model.method(@name).arity.zero?
|
99
|
+
if self.table.model.send(@name).respond_to?(:values)
|
100
|
+
return true
|
101
|
+
end
|
102
102
|
end
|
103
103
|
end
|
104
104
|
return false
|