aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-11-29 15:06:07 +0000
committerLouise Crow <louise.crow@gmail.com>2013-11-29 15:06:07 +0000
commiteb1432f9992275df485f8502ad3ab6f7c8d494b7 (patch)
treeec20310d47c7f4e4cd136ac1671b32db4a379ea7 /app/helpers/application_helper.rb
parent5ddd0620f8023c4bbf7d82e61f841dadd73bb7ba (diff)
parent20089cf7b5045d504b7240bc92e2b6068fcc2246 (diff)
Merge remote-tracking branch 'origin/merged-rails-3-2-assset-pipeline' into rails-3-develop
Conflicts: Gemfile.lock
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 0c346ab4e..4b603b064 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -54,16 +54,16 @@ module ApplicationHelper
# Highlight words, also escapes HTML (other than spans that we add)
def highlight_words(t, words, html = true)
if html
- highlight(h(t), words, '<span class="highlight">\1</span>').html_safe
+ highlight(h(t), words, :highlighter => '<span class="highlight">\1</span>').html_safe
else
- highlight(t, words, '*\1*')
+ highlight(t, words, :highlighter => '*\1*')
end
end
def highlight_and_excerpt(t, words, excount, html = true)
- newt = excerpt(t, words[0], excount)
+ newt = excerpt(t, words[0], :radius => excount)
if not newt
- newt = excerpt(t, '', excount)
+ newt = excerpt(t, '', :radius => excount)
end
t = newt
t = highlight_words(t, words, html)