Class: ModelAuditor::AttributeReaders::ArrayField
- Inherits:
-
Associated
- Object
- Associated
- ModelAuditor::AttributeReaders::ArrayField
- Defined in:
- lib/model_auditor/attribute_readers/array_field.rb
Instance Attribute Summary
Attributes inherited from Associated
Instance Method Summary collapse
Methods inherited from Associated
Constructor Details
This class inherits a constructor from ModelAuditor::AttributeReaders::Associated
Instance Method Details
#value ⇒ Object
6 7 8 9 10 11 |
# File 'lib/model_auditor/attribute_readers/array_field.rb', line 6 def value return unless method_name values = model.send(method_name).map { |i| i.try(:title) } values.join(', ') if values.try(:all?) end |