Files
nairobi/app/models/map_location.rb
rgarcia 7889efd6ee Fix map location update
When editing the map of a proposal or investment(the mappable) the
updated_at attribute of the mappable was not been updated and so the
map still displayed the old location after updating it
2017-12-20 12:43:49 +01:00

11 lines
236 B
Ruby

class MapLocation < ActiveRecord::Base
belongs_to :proposal, touch: true
belongs_to :investment, class_name: Budget::Investment, touch: true
def available?
latitude.present? && longitude.present? && zoom.present?
end
end