Add map_location#json_data method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user