diff --git a/app/components/polls/poll_component.html.erb b/app/components/polls/poll_component.html.erb index 6e52866ce..9852c1b30 100644 --- a/app/components/polls/poll_component.html.erb +++ b/app/components/polls/poll_component.html.erb @@ -1,9 +1,5 @@
- <% if !user_signed_in? %> -
"> - <%= t("polls.index.not_logged_in") %> -
- <% elsif user_signed_in? %> + <% if current_user %> <% if current_user.unverified? %>
"> <%= t("polls.index.unverified") %> @@ -17,6 +13,10 @@ <%= t("polls.index.already_answer") %>
<% end %> + <% else %> +
"> + <%= t("polls.index.not_logged_in") %> +
<% end %>
diff --git a/app/components/polls/poll_component.rb b/app/components/polls/poll_component.rb index 45aae8da8..ed0374b53 100644 --- a/app/components/polls/poll_component.rb +++ b/app/components/polls/poll_component.rb @@ -1,6 +1,6 @@ class Polls::PollComponent < ApplicationComponent attr_reader :poll - use_helpers :cannot?, :user_signed_in?, :current_user, :link_to_poll + use_helpers :cannot?, :current_user, :link_to_poll def initialize(poll) @poll = poll