Module: Cms::Concerns::Addressable::DeprecatedPageAccessors

Included in:
Attachment, Link, Page
Defined in:
lib/cms/concerns/can_be_addressable.rb

Overview

These exist for backwards compatibility to avoid having to change tests. I want to get rid of these in favor of parent and parent_id

Instance Method Summary collapse

Instance Method Details

#build_node(opts) ⇒ Object



288
289
290
# File 'lib/cms/concerns/can_be_addressable.rb', line 288

def build_node(opts)
  build_section_node(opts)
end

#sectionObject



300
301
302
# File 'lib/cms/concerns/can_be_addressable.rb', line 300

def section
  parent
end

#section=(sec) ⇒ Object



304
305
306
307
# File 'lib/cms/concerns/can_be_addressable.rb', line 304

def section=(sec)
  self.parent = sec

end

#section_idObject



292
293
294
# File 'lib/cms/concerns/can_be_addressable.rb', line 292

def section_id
  section ? section.id : nil
end

#section_id=(sec_id) ⇒ Object



296
297
298
# File 'lib/cms/concerns/can_be_addressable.rb', line 296

def section_id=(sec_id)
  self.section = Section.find(sec_id)
end