Module: Skyline::SectionItem

Overview

Defines the SectionItem interface. Include this module in all your sections.

If you’re creating your Section within the Skyline module (you probably shouldn’t), it will automatically sets your models table name to ‘skyline_sections_#basebase.table_name`

Examples:

Usage:

class Model < ActiveRecord::Base
  include Skyline::SectionItem
end

Defines:

Model.default_interface = true # defaults to true
@model = Model.new
@model.to_text #=> ""

Instance Method Summary collapse

Instance Method Details

#to_textString

This method is abstract.

Implement in your own section

The to_text method is needed for searching and other string operations which just want the content of this section without any markup.

Returns:

  • (String)

    The section’s content flattened to only text



32
33
34
# File 'lib/skyline/section_item.rb', line 32

def to_text
  ""
end