Class: Pageflow::EntryDuplicate

Inherits:
Struct
  • Object
show all
Defined in:
app/models/pageflow/entry_duplicate.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#original_entryObject

Returns the value of attribute original_entry

Returns:

  • (Object)

    the current value of original_entry



2
3
4
# File 'app/models/pageflow/entry_duplicate.rb', line 2

def original_entry
  @original_entry
end

Class Method Details

.of(entry) ⇒ Object



13
14
15
# File 'app/models/pageflow/entry_duplicate.rb', line 13

def self.of(entry)
  new(entry)
end

Instance Method Details

#create!Object



3
4
5
6
7
8
9
10
11
# File 'app/models/pageflow/entry_duplicate.rb', line 3

def create!
  create_entry

  copy_permalink
  copy_draft
  copy_memberships

  new_entry
end