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:
@@ -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 %>
|
||||||
|
|||||||
Reference in New Issue
Block a user