Files
grecia/app/components/debates/mark_featured_action_component.rb
Javi Martín f8faabf7d1 Extract component to mark a debate as featured
We're also moving the path argument in the `link_to` calls to a
different line, since it's what we usually do.
2024-11-08 13:24:05 +01:00

13 lines
217 B
Ruby

class Debates::MarkFeaturedActionComponent < ApplicationComponent
attr_reader :debate
use_helpers :can?
def initialize(debate)
@debate = debate
end
def render
can? :mark_featured, debate
end
end