diff --git a/app/helpers/followables_helper.rb b/app/helpers/followables_helper.rb index ee01d9aee..52a90f156 100644 --- a/app/helpers/followables_helper.rb +++ b/app/helpers/followables_helper.rb @@ -14,7 +14,7 @@ module FollowablesHelper return unless follow.followable.present? followable = follow.followable - partial = followable_class_name(followable) + "_follow" + partial = "#{followable_class_name(followable)}_follow" locals = { followable_class_name(followable).to_sym => followable } render partial, locals diff --git a/app/helpers/tracks_helper.rb b/app/helpers/tracks_helper.rb index 305876915..8236751d5 100644 --- a/app/helpers/tracks_helper.rb +++ b/app/helpers/tracks_helper.rb @@ -3,7 +3,7 @@ module TracksHelper track_data = "" prefix = " data-track-event-" data.each do |key, value| - track_data = track_data + prefix + key.to_s + "=" + value + " " + track_data = "#{track_data}#{prefix}#{key}=#{value} " end content_for :track_event do track_data diff --git a/app/helpers/verification_helper.rb b/app/helpers/verification_helper.rb index 587e17859..3dd9123c9 100644 --- a/app/helpers/verification_helper.rb +++ b/app/helpers/verification_helper.rb @@ -21,6 +21,6 @@ module VerificationHelper data_to_mask = match[2] email_provider = match[3] - data_to_display + "*" * data_to_mask.size + "@" + email_provider + "#{data_to_display}#{"*" * data_to_mask.size}@#{email_provider}" end end diff --git a/app/helpers/votes_helper.rb b/app/helpers/votes_helper.rb index dd436ea4e..8739c2323 100644 --- a/app/helpers/votes_helper.rb +++ b/app/helpers/votes_helper.rb @@ -7,9 +7,9 @@ module VotesHelper return "0%" if debate.total_votes == 0 if vote == "likes" - debate_percentage_of_likes(debate).to_s + "%" + "#{debate_percentage_of_likes(debate)}%" elsif vote == "dislikes" - (100 - debate_percentage_of_likes(debate)).to_s + "%" + "#{100 - debate_percentage_of_likes(debate)}%" end end diff --git a/db/dev_seeds/admin_notifications.rb b/db/dev_seeds/admin_notifications.rb index 308928d53..8823407df 100644 --- a/db/dev_seeds/admin_notifications.rb +++ b/db/dev_seeds/admin_notifications.rb @@ -7,7 +7,7 @@ section "Creating Admin Notifications & Templates" do "people will discuss & support it.", body_es: "Recuerda que puedes crear propuestas y los ciudadanos las debatirán y apoyarán.", - link: Setting["url"] + "/proposals", + link: "#{Setting["url"]}/proposals", segment_recipient: "administrators" ).deliver diff --git a/spec/system/admin/homepage/homepage_spec.rb b/spec/system/admin/homepage/homepage_spec.rb index e2ba36f7a..9a44cda7d 100644 --- a/spec/system/admin/homepage/homepage_spec.rb +++ b/spec/system/admin/homepage/homepage_spec.rb @@ -22,7 +22,7 @@ describe "Homepage" do scenario "Admin menu links to homepage path" do visit new_admin_widget_card_path(header_card: true) - click_link Setting["org_name"] + " Administration" + click_link "#{Setting["org_name"]} Administration" expect(page).to have_current_path(admin_root_path) end diff --git a/spec/system/admin/site_customization/documents_spec.rb b/spec/system/admin/site_customization/documents_spec.rb index 1b0ac771b..51d0a3f2b 100644 --- a/spec/system/admin/site_customization/documents_spec.rb +++ b/spec/system/admin/site_customization/documents_spec.rb @@ -58,7 +58,7 @@ describe "Documents" do scenario "Create" do visit new_admin_site_customization_document_path - attach_file("document_attachment", Rails.root + "spec/fixtures/files/logo.pdf") + attach_file("document_attachment", "#{Rails.root}/spec/fixtures/files/logo.pdf") click_button "Upload" expect(page).to have_content "Document uploaded succesfully" diff --git a/spec/system/social_media_meta_tags_spec.rb b/spec/system/social_media_meta_tags_spec.rb index f114c204f..448776b9d 100644 --- a/spec/system/social_media_meta_tags_spec.rb +++ b/spec/system/social_media_meta_tags_spec.rb @@ -33,8 +33,7 @@ describe "Social media meta tags" do expect(page).to have_property "og:title", with: meta_title expect(page).to have_property "article:publisher", with: url - expect(page).to have_property "article:author", with: "https://www.facebook.com/" + - facebook_handle + expect(page).to have_property "article:author", with: "https://www.facebook.com/#{facebook_handle}" expect(page).to have_property "og:url", with: "#{Capybara.app_host}/" expect(page).to have_property "og:image", with: "#{Capybara.app_host}/social_media_icon.png" expect(page).to have_property "og:site_name", with: org_name