summaryrefslogtreecommitdiff
path: root/app/models/wiki_directory.rb
blob: 9340fc2dbbe1aa13acec02556ff87daf2abf6afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class WikiDirectory
  include ActiveModel::Validations

  attr_accessor :slug, :pages

  validates :slug, presence: true

  def initialize(slug, pages = [])
    @slug = slug
    @pages = pages
  end

  # Relative path to the partial to be used when rendering collections
  # of this object.
  def to_partial_path
    'projects/wikis/wiki_directory'
  end
end