Module: Contentable::MigrationHelper
- Defined in:
- lib/contentable.rb
Overview
This module gives us some migration helpers that let us easily create the fields necessary for content items. We are switching this so that title can contain title information to show up in the resulting document title, while path is where you go to get there.
This doesn’t work yet - might want to consider scrapping it for now, but it would be good to have later. When we do that, we should make it model name agnostic…
Instance Method Summary collapse
Instance Method Details
#create_content_items ⇒ Object
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/contentable.rb', line 102 def create_content_items create_table :content_items do |t| t.string :name t.string :title t.string :description t.text :text t. end end |
#drop_content_items ⇒ Object
113 114 115 |
# File 'lib/contentable.rb', line 113 def drop_content_items drop_table :content_items end |