Module: Further::Core::LocalInstanceMethods

Defined in:
lib/further/core.rb

Instance Method Summary collapse

Instance Method Details

#further_info(attributes = {}) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/further/core.rb', line 23

def further_info(attributes = {})
  if self.further_information.present?
    if attributes.present?
      self.further_information.update_attributes info: attributes
    else
      self.further_information.info
    end
  else
    if attributes.present?
      info = self.build_further_information info: attributes
      info.save
    else
      {}
    end
  end
end