app/models/map.rb
# map gets error attibute set and gcps get error attribute set
map gets error attibute set and gcps get error attribute set
map gets error attibute set and gcps get error attribute set
def gcps_with_error(soft=nil)
    unless soft == 'true'
      gcps = Gcp.hard.find(:all, :conditions =>["map_id = ?", self.id], :order => 'created_at')
    else
      gcps = Gcp.soft.find(:all, :conditions =>["map_id = ?", self.id], :order => 'created_at')
    end
      gcps, map_error = ErrorCalculator::calc_error(gcps)
    @error = map_error
    gcps
  end
def gcps_with_error ( soft = nil ) unless soft == 'true' gcps = Gcp . hard . find ( :all , :conditions => [ "map_id = ?" , self . id ] , :order => 'created_at' ) else gcps = Gcp . soft . find ( :all , :conditions => [ "map_id = ?" , self . id ] , :order => 'created_at' ) end gcps , map_error = ErrorCalculator :: calc_error ( gcps ) @error = map_error gcps end
map gets error attibute set and gcps get error attribute set
map gets error attibute set and gcps get error attribute set
#send back the gpcs with error calculation
soft
<not_specific>