Module: HasContent::ActiveRecord
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/has_content/active_record.rb
Overview
has_content concern: allow spcification of content on models
content is a polymorphic association that is laoded on demand, and appears as if it were a normal attribute.
The advantages being that you can add content to models without modifying the database schema, and that you can treat pieces of content as objects in their own right (for example in place editing).
class MyModel
has_content :body, :sidebar
end
Defined Under Namespace
Modules: ClassMethods