Created
March 30, 2011 20:37
-
-
Save zooniverse/895246 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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