app/models/visma/address.rb
def method_missing(m, *args, &block)
      att = _real_attribute_name(m)
      raise NoMethodError, "The method :#{m} does not exist" unless att
      return self.send "#{att}=", *args if m =~ /=$/
      self.send attribute_aliases[m]
    end
# Catch common address attribute names, return correct value
# If the common name is used as a setter, set the real attribute
Catch common address attribute names, return correct value
If the common name is used as a setter, set the real attribute
Catch common address attribute names return correct value If the common name is used as a setter set the real attribute
def method_missing(m, *args, &block)
      att = _real_attribute_name(m)
      raise NoMethodError, "The method :#{m} does not exist" unless att
      return self.send "#{att}=", *args if m =~ /=$/
      self.send attribute_aliases[m]
    end
def method_missing ( m , * args , & block ) att = _real_attribute_name ( m ) raise NoMethodError , "The method :#{m} does not exist" unless att return self . send "#{att}=" , * args if m =~ / =$ / self . send attribute_aliases [ m ] end
Catch common address attribute names, return correct value
If the common name is used as a setter, set the real attribute
Catch common address attribute names return correct value If the common name is used as a setter set the real attribute
m
args
block