debian-mirror-gitlab/app/models/wiki_directory.rb

21 lines
391 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
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
2020-06-23 00:09:42 +05:30
'../shared/wikis/wiki_directory'
2017-08-17 22:00:37 +05:30
end
end