app/models/server.rb
def available_resource_bundles(count)
        rbs = self.resource_bundles.collect{ |rb| rb if rb.instance_id.blank? }.compact
        if (rbs.size < count) and !self.default_resource_bundle.nil?
            rbs += [ self.default_resource_bundle ] * ( count - rbs.size )
        end
        return rbs
    end
# get count of available resource bundles, fill out with default rb if necessary
get count of available resource bundles, fill out with default rb if necessary
get count of available resource bundles fill out with default rb if necessary
def available_resource_bundles(count)
        rbs = self.resource_bundles.collect{ |rb| rb if rb.instance_id.blank? }.compact
        if (rbs.size < count) and !self.default_resource_bundle.nil?
            rbs += [ self.default_resource_bundle ] * ( count - rbs.size )
        end
        return rbs
    end
def available_resource_bundles ( count ) rbs = self . resource_bundles . collect { | rb | rb if rb . instance_id . blank? } . compact if ( rbs . size < count ) and ! self . default_resource_bundle . nil? rbs += [ self . default_resource_bundle ] * ( count - rbs . size ) end return rbs end
get count of available resource bundles, fill out with default rb if necessary
get count of available resource bundles fill out with default rb if necessary
count