From f284d5c09e3710ca6f348e1525ecfc8f7db10ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 26 Apr 2019 12:07:56 +0200 Subject: [PATCH] Remove `record_tag_helper` It was only used in one place, and could easily be replaced. Note we usually use HTML classes like `map-location` instead of `map_location`, but I've kept the underscore for compatibility with the previous version. --- Gemfile | 1 - Gemfile.lock | 3 --- app/helpers/map_locations_helper.rb | 8 ++++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index e1981df89..2f2e1d3b9 100644 --- a/Gemfile +++ b/Gemfile @@ -41,7 +41,6 @@ gem "paperclip", "~> 5.2.1" gem "paranoia", "~> 2.4.1" gem "pg", "~> 0.21.0" gem "pg_search", "~> 2.0.1" -gem "record_tag_helper", "~> 1.0" gem "redcarpet", "~> 3.4.0" gem "responders", "~> 2.4.0" gem "rinku", "~> 2.0.2", require: "rails_rinku" diff --git a/Gemfile.lock b/Gemfile.lock index 1773e702f..4c8321b6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -385,8 +385,6 @@ GEM rake (12.3.2) recipient_interceptor (0.2.0) mail - record_tag_helper (1.0.0) - actionview (~> 5.x) redcarpet (3.4.0) referer-parser (0.3.0) request_store (1.4.0) @@ -591,7 +589,6 @@ DEPENDENCIES rails-assets-leaflet! rails-assets-markdown-it (~> 8.2.1)! recipient_interceptor (~> 0.2.0) - record_tag_helper (~> 1.0) redcarpet (~> 3.4.0) responders (~> 2.4.0) rinku (~> 2.0.2) diff --git a/app/helpers/map_locations_helper.rb b/app/helpers/map_locations_helper.rb index 4d17efb2d..eeab8681a 100644 --- a/app/helpers/map_locations_helper.rb +++ b/app/helpers/map_locations_helper.rb @@ -26,10 +26,10 @@ module MapLocationsHelper def render_map(map_location, parent_class, editable, remove_marker_label, investments_coordinates=nil) map_location = MapLocation.new if map_location.nil? - map = content_tag_for :div, - map_location, - class: "map", - data: prepare_map_settings(map_location, editable, parent_class, investments_coordinates) + map = content_tag :div, "", + id: dom_id(map_location), + class: "map_location map", + data: prepare_map_settings(map_location, editable, parent_class, investments_coordinates) map += map_location_remove_marker(map_location, remove_marker_label) if editable map end