AyuntamientoMadrid/participacion

View on GitHub
app/components/shared/comments_count_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Shared::CommentsCountComponent < ApplicationComponent
  attr_reader :comments_count, :url

  def initialize(comments_count, url: nil)
    @comments_count = comments_count
    @url = url
  end

  def text
    t("shared.comments", count: comments_count)
  end
end