Add map_location#json_data method

This commit is contained in:
María Checa
2018-03-07 17:49:38 +01:00
parent 7bfaf3c9c1
commit cd1a0548ba
2 changed files with 9 additions and 10 deletions

View File

@@ -9,4 +9,12 @@ class MapLocation < ActiveRecord::Base
latitude.present? && longitude.present? && zoom.present?
end
def json_data
{
id: id,
lat: latitude,
long: longitude
}
end
end