class ModelAuditor::AttributeReaders::ArrayField
Public Instance Methods
value()
click to toggle source
# 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
Private Instance Methods
method_name()
click to toggle source
# File lib/model_auditor/attribute_readers/array_field.rb, line 15 def method_name attr_name(/[s]?_ids$/, 's') end