diff --git a/app/helpers/links_helper.rb b/app/helpers/links_helper.rb
index dcca17693..89321462e 100644
--- a/app/helpers/links_helper.rb
+++ b/app/helpers/links_helper.rb
@@ -12,4 +12,8 @@ module LinksHelper
def link_to_signup(options = {})
link_to t("users.signup"), new_user_registration_path, options
end
+
+ def link_to_verify_account
+ link_to t("users.verify_account"), verification_path
+ end
end
diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb
index 3279b4e04..e194af049 100644
--- a/app/views/budgets/index.html.erb
+++ b/app/views/budgets/index.html.erb
@@ -38,7 +38,7 @@
<% else %>
<%= t("budgets.investments.index.sidebar.verified_only",
- verify: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify: link_to_verify_account).html_safe %>
<% end %>
<% else %>
diff --git a/app/views/budgets/investments/_ballot.html.erb b/app/views/budgets/investments/_ballot.html.erb
index 0507d9090..ae027b2fc 100644
--- a/app/views/budgets/investments/_ballot.html.erb
+++ b/app/views/budgets/investments/_ballot.html.erb
@@ -43,7 +43,6 @@
<% if reason.present? && !ballot.has_investment?(investment) %>
- <% verify_account = link_to(t("users.verify_account"), verification_path) %>
<% my_heading = link_to(investment.heading.name,
budget_investments_path(budget_id: investment.budget_id,
heading_id: investment.heading_id)) %>
@@ -53,7 +52,7 @@
<%= t("budgets.ballots.reasons_for_not_balloting.#{reason}",
- verify_account: verify_account, signin: link_to_signin,
+ verify_account: link_to_verify_account, signin: link_to_signin,
signup: link_to_signup, my_heading: my_heading,
change_ballot: change_ballot,
heading_link: heading_link(@assigned_heading, @budget)).html_safe %>
diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb
index 4f3c3ee60..63d577241 100644
--- a/app/views/budgets/investments/_sidebar.html.erb
+++ b/app/views/budgets/investments/_sidebar.html.erb
@@ -7,7 +7,7 @@
<% else %>
<%= t("budgets.investments.index.sidebar.verified_only",
- verify: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify: link_to_verify_account).html_safe %>
<% end %>
<% end %>
diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb
index d3bb650f1..9fca61f6e 100644
--- a/app/views/budgets/investments/_votes.html.erb
+++ b/app/views/budgets/investments/_votes.html.erb
@@ -33,7 +33,7 @@
<%= t("votes.budget_investments.#{reason}",
count: investment.group.max_votable_headings,
- verify_account: link_to(t("users.verify_account"), verification_path),
+ verify_account: link_to_verify_account,
signin: link_to_signin,
signup: link_to_signup,
supported_headings: (current_user && current_user.headings_voted_within_group(investment.group).map(&:name).sort.to_sentence)
diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb
index 86cb7fadb..0d1bf5779 100644
--- a/app/views/budgets/show.html.erb
+++ b/app/views/budgets/show.html.erb
@@ -24,7 +24,7 @@
<% else %>
<%= t("budgets.investments.index.sidebar.verified_only",
- verify: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify: link_to_verify_account).html_safe %>
<% end %>
<% else %>
diff --git a/app/views/comments/_comment_tree.html.erb b/app/views/comments/_comment_tree.html.erb
index 0a4c4ddc7..9e95cc748 100644
--- a/app/views/comments/_comment_tree.html.erb
+++ b/app/views/comments/_comment_tree.html.erb
@@ -24,7 +24,7 @@
<% elsif require_verified_resident_for_commentable?(commentable, current_user) %>
- <%= t("comments.verified_only", verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ <%= t("comments.verified_only", verify_account: link_to_verify_account).html_safe %>
<% elsif allow_comments %>
<%= render "comments/form", { commentable: commentable,
diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb
index 68b195f3f..cb7cdf9f5 100644
--- a/app/views/debates/_votes.html.erb
+++ b/app/views/debates/_votes.html.erb
@@ -52,8 +52,7 @@
<% elsif user_signed_in? && !debate.votable_by?(current_user) %>
- <%= t("votes.anonymous",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ <%= t("votes.anonymous", verify_account: link_to_verify_account).html_safe %>
<% elsif !user_signed_in? %>
diff --git a/app/views/direct_messages/new.html.erb b/app/views/direct_messages/new.html.erb
index cfd03a460..fef4d84dc 100644
--- a/app/views/direct_messages/new.html.erb
+++ b/app/views/direct_messages/new.html.erb
@@ -37,7 +37,7 @@
<%= t("users.direct_messages.new.verified_only",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify_account: link_to_verify_account).html_safe %>
<% end %>
diff --git a/app/views/legislation/proposals/_featured_votes.html.erb b/app/views/legislation/proposals/_featured_votes.html.erb
index b4ea6a2eb..090a095ea 100644
--- a/app/views/legislation/proposals/_featured_votes.html.erb
+++ b/app/views/legislation/proposals/_featured_votes.html.erb
@@ -22,8 +22,7 @@
<% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
- <%= t("votes.verified_only",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ <%= t("votes.verified_only", verify_account: link_to_verify_account).html_safe %>
<% elsif !user_signed_in? %>
diff --git a/app/views/legislation/proposals/_votes.html.erb b/app/views/legislation/proposals/_votes.html.erb
index 6bd1bed3f..a2e9bedad 100644
--- a/app/views/legislation/proposals/_votes.html.erb
+++ b/app/views/legislation/proposals/_votes.html.erb
@@ -55,7 +55,7 @@
<%= t("legislation.proposals.not_verified",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify_account: link_to_verify_account).html_safe %>
<% elsif !user_signed_in? %>
diff --git a/app/views/legislation/questions/_participation_not_allowed.html.erb b/app/views/legislation/questions/_participation_not_allowed.html.erb
index da08ab9c0..9057fde1a 100644
--- a/app/views/legislation/questions/_participation_not_allowed.html.erb
+++ b/app/views/legislation/questions/_participation_not_allowed.html.erb
@@ -8,7 +8,7 @@
<%= t("legislation.questions.participation.verified_only",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ verify_account: link_to_verify_account).html_safe %>
<% elsif !user_signed_in? %>
diff --git a/app/views/proposals/_featured_votes.html.erb b/app/views/proposals/_featured_votes.html.erb
index b4ea6a2eb..090a095ea 100644
--- a/app/views/proposals/_featured_votes.html.erb
+++ b/app/views/proposals/_featured_votes.html.erb
@@ -22,8 +22,7 @@
<% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
- <%= t("votes.verified_only",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ <%= t("votes.verified_only", verify_account: link_to_verify_account).html_safe %>
<% elsif !user_signed_in? %>
diff --git a/app/views/proposals/_votes.html.erb b/app/views/proposals/_votes.html.erb
index fabf00bae..f1801d732 100644
--- a/app/views/proposals/_votes.html.erb
+++ b/app/views/proposals/_votes.html.erb
@@ -29,8 +29,7 @@
- <%= t("votes.verified_only",
- verify_account: link_to(t("users.verify_account"), verification_path)).html_safe %>
+ <%= t("votes.verified_only", verify_account: link_to_verify_account).html_safe %>