Created
July 7, 2011 11:11
find the gap
This file contains 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
class DocumentSeries < ActiveRecord::Base | |
#... | |
# | |
# this returns an array of the free counter numbers in the series | |
# | |
def empty_series_counter_slots | |
(self.counter_start .. self.counter_current).to_a - self.documents.collect{|d| d.document_series_counter} | |
end | |
#... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment