Skip to content

Instantly share code, notes, and snippets.

@zooniverse
Created March 30, 2011 20:38
Show Gist options
  • Save zooniverse/895247 to your computer and use it in GitHub Desktop.
Save zooniverse/895247 to your computer and use it in GitHub Desktop.
def progress
prog = self.assets.where(:ave_pos => {"$size" => 2} ).sort({ :order => -1}).limit(10).all.collect { |a| a.ave_pos unless a.ave_pos.empty? }
return prog.compact
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment