Fix various rubocop issues.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user