Module: Skyline::Sections::Interface
- Defined in:
- lib/skyline/sections/interface.rb
Overview
Defines the section 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_#{base.table_name}
class Model < ActiveRecord::Base include Skyline::Sections::Interface end
class Model < ActiveRecord::Base has_one :section, :as => :sectionable, :class_name => "Skyline::Section" # The link back to the section self.default_interface = true # defaults to true
def to_text
...
end
end
Instance Method Summary collapse
-
#to_text ⇒ String
abstract
The to_text method is needed for searching and other string operations which just want the content of this section without any markup.
Instance Method Details
#to_text ⇒ String
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.
39 40 41 |
# File 'lib/skyline/sections/interface.rb', line 39 def to_text "" end |