Skip to content

Instantly share code, notes, and snippets.

@marcamillion
Created April 7, 2011 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcamillion/907629 to your computer and use it in GitHub Desktop.
Save marcamillion/907629 to your computer and use it in GitHub Desktop.
def num_gecko_users_percent
gecko_users = User.where(:plan_id => [1]).count
all_paid_users = User.where(:plan_id => [1, 2, 3, 4]).count
total = gecko_users / all_paid_users
return total.to_f
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment