afaga

Ruby code posted
created at 23 Jan 04:07

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module SeoHelper
  def title= title
    @title = title
  end
  
  def title
    if @title.blank?
      Settings.title.home
    else
      [@title, Settings.title.simple].join ' - '
    end
  end
  
  def keywords= keywords
    @keywords = keywords
  end

  def keywords
    if @keywords.blank?
      Settings.keywords
    else
      @keywords
    end
  end

  def description= description
    @description = description
  end

  def description
    if @description.blank?
      Settings.description
    else
      @description
    end
  end

  def canonical_link_tag path
    tag :link, :rel => 'canonical', :href => path
  end
end
671 Bytes in 5 ms with coderay