Class: Caboose::PageCustomFieldValue

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/caboose/page_custom_field_value.rb

Instance Method Summary collapse

Instance Method Details

#duplicate(page_id, page_custom_field_id) ⇒ Object


14
15
16
17
18
19
20
21
22
23
# File 'app/models/caboose/page_custom_field_value.rb', line 14

def duplicate(page_id, page_custom_field_id)
  v = Caboose::PageCustomFieldValue.create(
    :page_id              => page_id,
    :page_custom_field_id => page_custom_field_id,
    :key                  => self.key,
    :value                => self.value,
    :sort_order           => self.sort_order
  )
  return v
end