From 164f6be880ab43f604f9d91b7ff9c94fb5841c62 Mon Sep 17 00:00:00 2001 From: Bryan Larsen Date: Mon, 3 Jun 2013 16:38:26 +0200 Subject: [PATCH] markdown-formatting-of-stories # Markdown / Textile formatting of stories We'll wrap up this section with a really easy one. Hobo renders model fields based on their type. You can add your own custom types and there's a bunch built-in, including textile and markdown formatted strings. Location the `fields do ... end` section in the Story model, and change SHOW_PATCH --- app/models/story.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/story.rb b/app/models/story.rb index 0f54a82..8e2f419 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -4,7 +4,7 @@ class Story < ActiveRecord::Base fields do title :string - body :text + body :markdown # or :textile tasks_count :integer, :default => 0, :null => false timestamps end