Remove redundant value assignments in map fields

Rails forms automatically take the value from the object related to the
form.
This commit is contained in:
Javi Martín
2023-03-07 19:21:37 +01:00
parent b9518d64e1
commit c667582c98

View File

@@ -4,7 +4,7 @@
<%= form.fields_for :map_location, map_location do |m_l_fields| %> <%= form.fields_for :map_location, map_location do |m_l_fields| %>
<%= render_map(map_location, remove_marker_label: remove_marker_label, form: m_l_fields) %> <%= render_map(map_location, remove_marker_label: remove_marker_label, form: m_l_fields) %>
<%= m_l_fields.hidden_field :latitude, value: map_location.latitude %> <%= m_l_fields.hidden_field :latitude %>
<%= m_l_fields.hidden_field :longitude, value: map_location.longitude %> <%= m_l_fields.hidden_field :longitude %>
<%= m_l_fields.hidden_field :zoom, value: map_location.zoom %> <%= m_l_fields.hidden_field :zoom %>
<% end %> <% end %>