Files
nairobi/app/components/comments/votes_component.rb
Javi Martín 70f717e564 Use current user in votes components
Just like we do in most places; we almost never use `user_signed_in?`.
2022-02-21 18:47:13 +01:00

9 lines
217 B
Ruby

class Comments::VotesComponent < ApplicationComponent
attr_reader :comment
delegate :current_user, :can?, :link_to_signin, :link_to_signup, to: :helpers
def initialize(comment)
@comment = comment
end
end