Skip to content

Instantly share code, notes, and snippets.

@latentflip
Created March 30, 2012 09:20
Show Gist options
  • Save latentflip/2250248 to your computer and use it in GitHub Desktop.
Save latentflip/2250248 to your computer and use it in GitHub Desktop.
Can you spot the deliberate mistake
def attributes_from_bill_json(json)
accounting_category = find_accounting_category(json['category']),
{
:accounting_category => accounting_category,
:project_name => find_project_name(json['project']),
:contact => find_contact(json['contact'])
}
end
bill.update_attributes(attributes_from_bill_json(json)) #=> raises "undefined method 'stringify_keys!' for Array"??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment