Skip to content

Instantly share code, notes, and snippets.

@zooniverse
Created March 30, 2011 20:37
Show Gist options
  • Save zooniverse/895246 to your computer and use it in GitHub Desktop.
Save zooniverse/895246 to your computer and use it in GitHub Desktop.
def progress
prog = self.assets.collect { |a| a.ave_pos if !a.ave_pos.empty? }.compact!
# only show the last 10 positions
limited_progress = prog.reverse.slice(0,10)
if prog.empty?
return []
else
return limited_progress
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment