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:
Javi Martín
2021-09-28 23:21:43 +02:00
parent 4b42a68b6a
commit 70f717e564
8 changed files with 20 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
class Proposals::VotesComponent < ApplicationComponent
attr_reader :proposal
delegate :current_user, :link_to_verify_account, :user_signed_in?, to: :helpers
delegate :current_user, :link_to_verify_account, to: :helpers
def initialize(proposal, vote_url: nil)
@proposal = proposal