app/models/c80_estate/area.rb in c80_estate-0.1.0.12 vs app/models/c80_estate/area.rb in c80_estate-0.1.0.13
- old
+ new
@@ -226,10 +226,14 @@
res = owner.id
end
res
end
+ def last_updater
+ sevents.last.auser.email
+ end
+
def price_value
res = '-'
p = item_props.where(:prop_name_id => 1)
if p.count > 0
res = p.first.value
@@ -242,9 +246,17 @@
p = item_props.where(:prop_name_id => 9)
if p.count > 0
res = p.first.value
end
res
+ end
+
+ def main_image_url
+ url = 'no_thumb.png'
+ if aphotos.count > 0
+ url = aphotos.first.image.thumb512
+ end
+ url
end
ransacker :item_prop_price_val,
formatter: proc { |price_range| # 10,156
results = C80Estate::Area.where_price_range(price_range).map(&:id)
\ No newline at end of file