Method: JsonApiClient::Helpers::Dirty#method_missing

Defined in:
lib/json_api_client/helpers/dirty.rb

#method_missing(method, *args, &block) ⇒ Object (protected)



58
59
60
61
62
63
64
65
66
# File 'lib/json_api_client/helpers/dirty.rb', line 58

def method_missing(method, *args, &block)
  if method.to_s =~ /^(.*)_changed\?$/
    has_attribute?($1) ? attribute_changed?($1) : nil
  elsif method.to_s =~ /^(.*)_was$/
    has_attribute?($1) ? attribute_was($1) : nil
  else
    super
  end
end