| Class | Block |
| In: |
app/models/block.rb
|
| Parent: | ActiveRecord::Base |
returns the description of the block, used when the user sees a list of blocks to choose one to include in the design.
Must be redefined in subclasses to match the description of each block type.
# File app/models/block.rb, line 20
20: def self.description
21: '(dummy)'
22: end
Returns the content to be used for this block.
This method can return several types of objects:
block can then use render, link_to, etc.
The method can also return nil, which means "no content".
See BoxesHelper#extract_block_content for implementation details.
# File app/models/block.rb, line 36
36: def content
37: "This is block number %d" % self.id
38: end
# File app/models/block.rb, line 62
62: def css_class_name
63: self.class.name.underscore.gsub('_', '-')
64: end