Files
nairobi/app/components/budgets/groups_and_headings_component.rb
Javi Martín 4c23f639be Use heading name as link text
Using the name instead of using the name and the price is IMHO more
consistent with the rest of the application, particularly for screen
reader users. Writing texts clicking those links is also easier.

I think the main reason why we used the price as part of the link was so
the clickable area was bigger. We can accomplish the same result with
CSS.
2021-03-18 13:59:09 +01:00

14 lines
243 B
Ruby

class Budgets::GroupsAndHeadingsComponent < ApplicationComponent
attr_reader :budget
def initialize(budget)
@budget = budget
end
private
def price(heading)
tag.span(budget.formatted_heading_price(heading))
end
end