Method: ActiveModel::AttributeMethods#attribute_missing

Defined in:
lib/active_model/attribute_methods.rb

#attribute_missing(match, *args, &block) ⇒ 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.



447
448
449
# File 'lib/active_model/attribute_methods.rb', line 447

def attribute_missing(match, *args, &block)
  __send__(match.target, match.attr_name, *args, &block)
end