app/models/service_learning/service_learning_position.rb
def update_placement_counts!
    counts = {
      :total_placements_count => placements.count,
      :filled_placements_count => placements.filled.count,
      :unallocated_placements_count => placements.unallocated.count
    }
    
    self.update_attributes(counts)
  end
# Updates the service learning postion's placement counts.
# Called when a placement is created, saved or destroyed
Updates the service learning postion's placement counts.
Called when a placement is created, saved or destroyed
Updates the service learning postion ' s placement counts . Called when a placement is created saved or destroyed
def update_placement_counts!
    counts = {
      :total_placements_count => placements.count,
      :filled_placements_count => placements.filled.count,
      :unallocated_placements_count => placements.unallocated.count
    }
    self.update_attributes(counts)
  end
def update_placement_counts! counts = { :total_placements_count => placements . count , :filled_placements_count => placements . filled . count , :unallocated_placements_count => placements . unallocated . count } self . update_attributes ( counts ) end
Updates the service learning postion's placement counts.
Updates the service learning postion ' s placement counts .