Refactored shared article import. Added meta search gem.
This commit is contained in:
parent
1e33411516
commit
013637a4fc
8 changed files with 42 additions and 54 deletions
|
|
@ -88,15 +88,6 @@ module ApplicationHelper
|
|||
return weekdays[dayNumber]
|
||||
end
|
||||
|
||||
# highlights a phrase in given text
|
||||
# based on the rails text-helper 'highlight'
|
||||
def highlight_phrase(text, phrase, highlighter = '<strong class="highlight">\1</strong>')
|
||||
unless phrase.blank? || text.nil?
|
||||
phrase.split(' ').each {|keyword| text.gsub!(/(#{Regexp.escape(keyword)})/i, highlighter)}
|
||||
end
|
||||
return text
|
||||
end
|
||||
|
||||
# to set a title for both the h1-tag and the title in the header
|
||||
def title(page_title, show_title = true)
|
||||
content_for(:title) { page_title.to_s }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue