Fix Naming/MethodName Lint (#458)

This commit is contained in:
Kohei Sugi 2018-08-25 03:54:51 +09:00 committed by Mac Siri
parent f423511178
commit c50ac78c4b
4 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,5 @@
module ArticlesHelper
def hasVid(article)
def has_vid?(article)
article.processed_html.include?("youtube.com/embed/") || article.processed_html.include?("player.vimeo.com") || article.comments_blob.include?("youtube")
end

View file

@ -17,7 +17,7 @@ class PodcastTag < LiquidTagBase
def render(_context)
html = <<-HTML
<div class="podcastliquidtag" style="#{renderStyle}">
<div class="podcastliquidtag" style="#{render_style}">
<div class="podcastliquidtag__info">
<a href="/#{@podcast.slug}/#{@episode.slug}">
<h1 class="podcastliquidtag__info__episodetitle">#{@episode.title}</h1>
@ -56,7 +56,7 @@ class PodcastTag < LiquidTagBase
finalize_html(html)
end
def renderStyle
def render_style
"background:##{@podcast.main_color_hex} " \
"url(#{cl_image_path(@podcast.pattern_image_url || 'https://i.imgur.com/fKYKgo4.png', type: 'fetch', quality: 'auto', sign_url: true, flags: 'progressive', fetch_format: 'jpg')})"
end

View file

@ -220,7 +220,7 @@
<%= render "articles/sticky_nav", sticky_articles: @sticky_articles %>
<% if hasVid(@article) %>
<% if has_vid?(@article) %>
<%= render 'articles/fitvids' %>
<% end %>
<% if @article.processed_html.include? 'class="twitter-tweet"' %>

View file

@ -102,7 +102,7 @@
<%= render "articles/conduct_and_abuse_actions", page: "comments_index" %>
</center>
</div>
<% if hasVid(@commentable) %>
<% if has_vid?(@commentable) %>
<%= render 'articles/fitvids' %>
<% end %>