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]
|
||||
|
||||
@@ -2,5 +2,4 @@ module ArtistCommentaryVersionsHelper
|
||||
def artist_commentary_versions_listing_type
|
||||
params.dig(:search, :post_id).present? ? :revert : :standard
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module NoteVersionsHelper
|
||||
def note_versions_listing_type
|
||||
(params.dig(:search, :post_id).present? || params.dig(:search, :note_id).present?) && CurrentUser.is_member? ? :revert : :standard
|
||||
((params.dig(:search, :post_id).present? || params.dig(:search, :note_id).present?) && CurrentUser.is_member?) ? :revert : :standard
|
||||
end
|
||||
|
||||
def note_version_body_diff_info(note_version)
|
||||
|
||||
@@ -23,4 +23,4 @@ module PoolVersionsHelper
|
||||
pattern = Regexp.new('(?:<.+?>)|(?:\w+)|(?:[ \t]+)|(?:\r?\n)|(?:.+?)')
|
||||
DiffBuilder.new(other_version.description, pool_version.description, pattern).build
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user