lib/carte/server/models/card.rb in carte-server-0.0.3 vs lib/carte/server/models/card.rb in carte-server-0.0.4
- old
+ new
@@ -32,10 +32,10 @@
self.title = self.new_title
self.new_title = nil
end
def self.sample(size=1)
- self.in(id: (1...self.count).to_a.sample(size))
+ self.in(id: (1..self.count).to_a.sample(size))
end
def lefts(size=1)
ids = []
count = self.class.all.count