Skip to content

Instantly share code, notes, and snippets.

@zmoazeni
Created January 28, 2009 00:56
Show Gist options
  • Save zmoazeni/53751 to your computer and use it in GitHub Desktop.
Save zmoazeni/53751 to your computer and use it in GitHub Desktop.
audits = current_health.audits.find_all_by_created_at(day_helper.bae_of_day(day_of_month))
# this is needed for production. Otherwise detect doesn't work
audits.collect(&:changes)
return false if audits.empty?
audits.detect { |a| !a.changes["weight"].nil? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment