Fix various rubocop issues.

This commit is contained in:
evazion
2020-01-11 19:01:40 -06:00
parent bab656a873
commit aff3d3b18f
15 changed files with 24 additions and 32 deletions

View File

@@ -121,7 +121,7 @@ module ApplicationHelper
link_to text, wiki_page_path(title), class: "wiki-link", **options
end
def link_to_wikis(*wiki_titles, last_word_connector: ", or", **options)
def link_to_wikis(*wiki_titles, **options)
links = wiki_titles.map do |title|
link_to_wiki title.tr("_", " "), title
end
@@ -245,7 +245,7 @@ module ApplicationHelper
def data_attributes_for(record, prefix, attributes)
attributes.map do |attr|
if attr.kind_of?(Array)
if attr.is_a?(Array)
name = attr.map {|sym| sym.to_s.dasherize.delete("?")}.join('-')
value = record
attr.each do |sym|
@@ -261,7 +261,7 @@ module ApplicationHelper
if value.nil?
value = "null"
end
if prefix.length == 0
if prefix.blank?
[:"#{name}", value]
else
[:"#{prefix}-#{name}", value]