Class: Maglev::ClonePage

Inherits:
Object
  • Object
show all
Includes:
Injectable
Defined in:
app/services/maglev/clone_page.rb

Overview

Clone a page in all the locales. The service also makes sure that the path of the cloned page will be unique.

Instance Method Summary collapse

Instance Method Details

#callObject



12
13
14
15
16
# File 'app/services/maglev/clone_page.rb', line 12

def call
  return nil unless page.persisted?

  create_page!
end