debian-mirror-gitlab/app/services/wiki_pages/create_service.rb

15 lines
290 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
module WikiPages
class CreateService < WikiPages::BaseService
def execute
project_wiki = ProjectWiki.new(@project, current_user)
page = WikiPage.new(project_wiki)
if page.create(@params)
execute_hooks(page, 'create')
end
page
end
end
end