rubocop: fix various Rubocop warnings.
This commit is contained in:
@@ -22,11 +22,12 @@ module PopularPostsHelper
|
||||
end
|
||||
|
||||
def date_range_description(date, scale, min_date, max_date)
|
||||
if scale == "day"
|
||||
case scale
|
||||
when "day"
|
||||
date.strftime("%B %d, %Y")
|
||||
elsif scale == "week"
|
||||
when "week"
|
||||
"#{min_date.strftime("%B %d, %Y")} - #{max_date.strftime("%B %d, %Y")}"
|
||||
elsif scale == "month"
|
||||
when "month"
|
||||
date.strftime("%B %Y")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user