about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-19 00:23:46 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-19 00:23:46 +0100
commit47d1cb4e2183949e50488187a74e3ce9b3d7d3b8 (patch)
tree6d660545ccfb82b067b42a86fe9155a42b0ab1ee /app/helpers
parent071f64d317408b556c4f85e2f2abd80fe815de8b (diff)
TIL a return from a block seems to return from the whole method rather than
the block, even though the last line of a block is an implicit return. I am
confused to say the least
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 56207c4bb..dad7ed349 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -19,7 +19,7 @@ module ApplicationHelper
 
     auto_link(coder.encode(status.text), link: :urls, html: { rel: 'nofollow noopener' }).gsub(Account::MENTION_RE) do |m|
       account = mention_hash[Account::MENTION_RE.match(m)[1]]
-      return "#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
+      "#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
     end.html_safe
   end