AyuntamientoMadrid/participacion

View on GitHub
app/components/sdg_management/goals/index_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
class SDGManagement::Goals::IndexComponent < ApplicationComponent
  include Header

  attr_reader :goals

  def initialize(goals)
    @goals = goals
  end

  private

    def title
      SDG::Goal.model_name.human(count: 2).titleize
    end

    def attribute_name(attribute)
      SDG::Goal.human_attribute_name(attribute)
    end
end