class Page

Public Class Methods

new(attrs = {}) click to toggle source
Calls superclass method
# File rumblelog.rb, line 121
def initialize(attrs = {})
  super(attrs)
end

Public Instance Methods

to_html_hash() click to toggle source
# File rumblelog.rb, line 136
def to_html_hash
  html_hash = data
  html_hash[:links_for_tags] = self.links_for_tags
  html_hash
end
update_tags() click to toggle source
# File rumblelog.rb, line 142
def update_tags
  tags = self.data['tags']
  unless tags.nil?
    tags.split(",").each do |tag_name|
      tag_name.strip!
      tag =
        begin
          Tag.create!(unique_id: tag_name)
        rescue
          Tag.find_by_unique_id(tag_name)
        end
      tag.pages.add self
    end
  end
end