Method: ActiveModel::AttributeMethods#attribute_missing

Defined in:
lib/active_model/attribute_methods.rb

#attribute_missing(match) ⇒ Object

attribute_missing is like method_missing, but for attributes. When method_missing is called we check to see if there is a matching attribute method. If so, we tell attribute_missing to dispatch the attribute. This method can be overloaded to customize the behavior.


520
521
522
# File 'lib/active_model/attribute_methods.rb', line 520

def attribute_missing(match, ...)
  __send__(match.proxy_target, match.attr_name, ...)
end