Module: Globalize2::PagePartExtensions

Defined in:
lib/globalize2/page_part_extensions.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/globalize2/page_part_extensions.rb', line 3

def self.included(base)
  base.class_eval do
    extend Globalize2::LocalizedContent
    
    localized_content_for :content
  end
end

Instance Method Details

#cloneObject



11
12
13
14
15
16
17
# File 'lib/globalize2/page_part_extensions.rb', line 11

def clone
  new_page_part = super
  translations.each do |t|
    new_page_part.translations << t.clone
  end
  new_page_part
end