Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wiki_directory.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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