This rule was added in Rubocop 0.89.0. However, there are some false positives when we don't use interpolation but simply concatenate in order to avoid long lines. Even if there weren't false positives, there are places where we concatenate to emphasize the point that we're adding a certain character to a text. We might reconsider this rule in the future, since we generally prefer interpolation over concatenation.
13 lines
268 B
Ruby
13 lines
268 B
Ruby
module TracksHelper
|
|
def track_event(data = {})
|
|
track_data = ""
|
|
prefix = " data-track-event-"
|
|
data.each do |key, value|
|
|
track_data = "#{track_data}#{prefix}#{key}=#{value} "
|
|
end
|
|
content_for :track_event do
|
|
track_data
|
|
end
|
|
end
|
|
end
|