lib/videojuicer/resource/collection.rb in vj-sdk-0.7.1 vs lib/videojuicer/resource/collection.rb in vj-sdk-0.7.2

- old
+ new

@@ -19,9 +19,14 @@ self.total = total self.offset = offset self.limit = limit end + def self.limit_from_page_number page, limit + return 0 if page == 1 + (page - 1) * limit + end + def page_count return 1 if limit.nil? or total.nil? or total < 1 (total.to_f/limit.to_f).ceil end \ No newline at end of file