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 CHANGED
@@ -1 +1 @@
1
- 4.1.7
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.table.model.respond_to?(@name) and !@options[:through]
85
- if self.table.model.send(@name).respond_to?(:values)
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.send(@name).respond_to?(:values)
101
- return true
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: active-list
3
3
  version: !ruby/object:Gem::Version
4
4
  version: !binary |-
5
- NC4xLjc=
5
+ NC4xLjg=
6
6
  prerelease:
7
7
  platform: ruby
8
8
  authors: