mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:31:42 +00:00
no perder las coordenadas al guardar!
This commit is contained in:
parent
ea5b7ae9d2
commit
3300e65022
1 changed files with 2 additions and 5 deletions
|
@ -7,7 +7,7 @@ class MetadataGeo < MetadataTemplate
|
|||
end
|
||||
|
||||
def empty?
|
||||
self[:value].nil? || value == default_value
|
||||
value == default_value
|
||||
end
|
||||
|
||||
def to_param
|
||||
|
@ -17,10 +17,7 @@ class MetadataGeo < MetadataTemplate
|
|||
def save
|
||||
return true if empty?
|
||||
|
||||
self[:value] = {
|
||||
'lat' => self[:value]['lat'].to_f,
|
||||
'lng' => self[:value]['lng'].to_f
|
||||
}
|
||||
self[:value] = value.transform_values(&:to_f)
|
||||
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue