Module: Cms::Addressable::DeprecatedPageAccessors
- Includes:
- LeafNode, NodeAccessors
- Included in:
- Cms::Attachment, Link, Page
- Defined in:
- lib/cms/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
- #build_node(opts) ⇒ Object
- #section ⇒ Object
- #section=(sec) ⇒ Object
- #section_id ⇒ Object
- #section_id=(sec_id) ⇒ Object
Methods included from NodeAccessors
Methods included from LeafNode
Instance Method Details
#build_node(opts) ⇒ Object
71 72 73 |
# File 'lib/cms/addressable.rb', line 71 def build_node(opts) build_section_node(opts) end |
#section ⇒ Object
83 84 85 |
# File 'lib/cms/addressable.rb', line 83 def section parent end |
#section=(sec) ⇒ Object
87 88 89 90 |
# File 'lib/cms/addressable.rb', line 87 def section=(sec) self.parent = sec end |
#section_id ⇒ Object
75 76 77 |
# File 'lib/cms/addressable.rb', line 75 def section_id section ? section.id : nil end |
#section_id=(sec_id) ⇒ Object
79 80 81 |
# File 'lib/cms/addressable.rb', line 79 def section_id=(sec_id) self.section = Section.find(sec_id) end |