Skip to content

Commit

Permalink
Fix new rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jun 27, 2023
1 parent d1d80ce commit 466de96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/user_mailer_helper.rb
Expand Up @@ -29,7 +29,7 @@ def style_message(html)
# Because we can't use stylesheets in HTML emails, we need to inline the
# styles. Rather than copy-paste the same string of CSS into every message,
# we apply it once here, after the message has been composed.
html.gsub(/<p>/, '<p style="color: black; margin: 0.75em 0; font-family: \'Helvetica Neue\', Arial, Sans-Serif">')
html.gsub("<p>", '<p style="color: black; margin: 0.75em 0; font-family: \'Helvetica Neue\', Arial, Sans-Serif">')
end

def style_left
Expand Down
2 changes: 1 addition & 1 deletion app/models/language.rb
Expand Up @@ -14,7 +14,7 @@ class Language < ApplicationRecord

def self.load(file)
Language.transaction do
YAML.safe_load(File.read(file)).each do |k, v|
YAML.safe_load_file(file).each do |k, v|
Language.update(k, :english_name => v["english"], :native_name => v["native"])
rescue ActiveRecord::RecordNotFound
Language.create do |l|
Expand Down
2 changes: 1 addition & 1 deletion lib/osm_community_index.rb
Expand Up @@ -6,7 +6,7 @@ def self.add_to_i18n
files = Rails.root.glob("node_modules/osm-community-index/i18n/*.yaml")
files.each do |file|
locale = File.basename(file, ".yaml")
community_locale_yaml = YAML.safe_load(File.read(file))[locale]
community_locale_yaml = YAML.safe_load_file(file)[locale]
# rails wants language-COUNTRY but osm-community-index uses underscores
locale_rails = locale.tr("_", "-")

Expand Down

0 comments on commit 466de96

Please sign in to comment.