app/models/c80_estate/property.rb in c80_estate-0.1.0.14 vs app/models/c80_estate/property.rb in c80_estate-0.1.0.15

- old
+ new

@@ -35,7 +35,35 @@ url = plogos.first.image.thumb256 end url end + def main_image_url + url = 'no_thumb.png' + if pphotos.count > 0 + url = pphotos.first.image.thumb512 + end + url + end + + def last_updater + pstats.last.sevent.auser.email + end + + def square_value + sum = 0 + areas.all.each do |area| + sum += area.square_value + end + sum + end + + def power_price_value + sum = 0 + areas.all.each do |area| + sum += area.power_price_value + end + sum + end + end end \ No newline at end of file