# class Wiki

### Protected Class Methods

regenerate_from(wiki) click to toggle source

    # File app/models/wiki.rb, line 20
    def self.regenerate_from wiki
      regenerated_field = [:slug, :content, :title]

      new_wiki = Wiki.new
      regenerated_field.each do |field|
        new_wiki.send("#{field}=", wiki.send(field))
      end
      new_wiki
    end

### Public Instance Methods

to_param() click to toggle source

    # File app/models/wiki.rb, line 14
    def to_param
      slug
    end

### Protected Instance Methods

set_slug() click to toggle source

    # File app/models/wiki.rb, line 30
    def set_slug
      self.slug = self.title.parameterize
    end