Skip to content

Instantly share code, notes, and snippets.

@jraczak
Created March 9, 2012 18:20
Show Gist options
  • Save jraczak/2007869 to your computer and use it in GitHub Desktop.
Save jraczak/2007869 to your computer and use it in GitHub Desktop.
def requirements_approved
total = requirements.count
approved = requirements.where(approved: true).count
approved.to_f / total
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment