Use current user in votes components
Just like we do in most places; we almost never use `user_signed_in?`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Comments::VotesComponent < ApplicationComponent
|
||||
attr_reader :comment
|
||||
delegate :user_signed_in?, :can?, :link_to_signin, :link_to_signup, to: :helpers
|
||||
delegate :current_user, :can?, :link_to_signin, :link_to_signup, to: :helpers
|
||||
|
||||
def initialize(comment)
|
||||
@comment = comment
|
||||
|
||||
Reference in New Issue
Block a user