Class: Formily::InputValue

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/formily/input_value.rb

Instance Method Summary collapse

Instance Method Details

#get_valueObject



11
12
13
14
15
16
17
18
19
20
21
# File 'app/models/formily/input_value.rb', line 11

def get_value
  if self.attach.blank?
    if self.input.inputs.blank?
      self.input_value
    else
      self.input.inputs.map{|i| i.data.input_value.get_value}.join(', ')
    end
  else
    self.attach.file.url
  end
end