Class: ContentBlock
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ContentBlock
- Extended by:
- FriendlyId
- Defined in:
- app/models/content_block.rb
Overview
Belongs to a Page. A chunk of presentable content, either made up of plain text or HTML.
Instance Method Summary collapse
-
#render ⇒ String
A string of plain text or render-safe HTML.
Instance Method Details
#render ⇒ String
Returns a string of plain text or render-safe HTML.
15 16 17 18 19 20 21 |
# File 'app/models/content_block.rb', line 15 def render if allow_html content.html_safe else content end end |