lib/rentjuicer/listings.rb in rentjuicer-0.4.0 vs lib/rentjuicer/listings.rb in rentjuicer-0.4.1

- old
+ new

@@ -44,12 +44,13 @@ end all_listings.flatten end def find_all_by_ids(listing_ids) + listing_ids = listing_ids.split(',') if listing_ids.is_a?(String) all_listings = [] - listing_ids.split(',').in_groups_of(500).each do |group| + listing_ids.in_groups_of(500, false).each do |group| group.delete_if{|x| x.nil?} all_listings << find_all(:rentjuice_id => group.join(',')) end all_listings.flatten end @@ -68,9 +69,17 @@ props = [] self.body.listings.each do |listing| props << Rentjuicer::Listing.new(listing) end props + end + + def mls_results? + properties.any?{|property| property.mls_listing?} + end + + def mls_disclaimers + properties.collect{|property| property.mls_disclaimer}.compact.uniq end def paginator paginator_cache if paginator_cache self.paginator_cache = WillPaginate::Collection.create(