Module: TagsHelper

Defined in:
app/helpers/tags_helper.rb

Instance Method Summary collapse

Instance Method Details


2
3
4
5
6
7
# File 'app/helpers/tags_helper.rb', line 2

def looking_for_tag_link
  return if search_query.include?('@') || normalized_tag_name.blank?
  ('small') do
    t('people.index.looking_for', :tag_link => tag_link).html_safe
  end
end

#normalized_tag_nameObject


9
10
11
# File 'app/helpers/tags_helper.rb', line 9

def normalized_tag_name
  ActsAsTaggableOn::Tag.normalize(search_query)
end

13
14
15
16
# File 'app/helpers/tags_helper.rb', line 13

def tag_link
  tag = normalized_tag_name
  link_to("##{tag}", tag_path(:name => tag))
end