aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/answer.rb2
-rw-r--r--app/models/comment.rb2
-rw-r--r--app/models/question_content_multiple_choice.rb2
-rw-r--r--app/models/question_content_text.rb2
-rw-r--r--app/models/question_group.rb2
-rw-r--r--app/models/user.rb2
-rw-r--r--app/views/taglibs/views.dryml4
-rw-r--r--config/environment.rb1
8 files changed, 9 insertions, 8 deletions
diff --git a/app/models/answer.rb b/app/models/answer.rb
index 8709c17..079877c 100644
--- a/app/models/answer.rb
+++ b/app/models/answer.rb
@@ -5,7 +5,7 @@ class Answer < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
- content :text
+ content HoboFields::MarkdownString
approved :boolean, :default => false
reference :boolean, :default => false
timestamps
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 1c56454..8bdc279 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -3,7 +3,7 @@ class Comment < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
- content :text
+ content HoboFields::MarkdownString
timestamps
end
belongs_to :answer
diff --git a/app/models/question_content_multiple_choice.rb b/app/models/question_content_multiple_choice.rb
index f15167f..c3315c3 100644
--- a/app/models/question_content_multiple_choice.rb
+++ b/app/models/question_content_multiple_choice.rb
@@ -4,7 +4,7 @@ class QuestionContentMultipleChoice < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
- content :text
+ content HoboFields::MarkdownString
timestamps
end
diff --git a/app/models/question_content_text.rb b/app/models/question_content_text.rb
index 14c6a20..78cebee 100644
--- a/app/models/question_content_text.rb
+++ b/app/models/question_content_text.rb
@@ -4,7 +4,7 @@ class QuestionContentText < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
- content :text
+ content HoboFields::MarkdownString
timestamps
end
diff --git a/app/models/question_group.rb b/app/models/question_group.rb
index 4dd9c96..897c621 100644
--- a/app/models/question_group.rb
+++ b/app/models/question_group.rb
@@ -4,7 +4,7 @@ class QuestionGroup < ActiveRecord::Base
fields do
name :string, :null => false
- description :text, :null => false
+ description HoboFields::MarkdownString, :null => false
timestamps
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 61bf6aa..de32e14 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -8,7 +8,7 @@ class User < ActiveRecord::Base
administrator :boolean, :default => false
role Role, :default => 'recruit'
nick :string
- contributions :text
+ contributions HoboFields::MarkdownString
timestamps
end
diff --git a/app/views/taglibs/views.dryml b/app/views/taglibs/views.dryml
index 4792d5f..6176017 100644
--- a/app/views/taglibs/views.dryml
+++ b/app/views/taglibs/views.dryml
@@ -1,13 +1,13 @@
<def tag="view" for="QuestionContentText">
<%raise HoboError, "view of non-viewable field '#{this_field}' of #{this_parent.typed_id rescue this_parent}" unless can_view?%>
<div>
- <%= this.content%>
+ <%= this.content.to_html%>
</div>
</def>
<def tag="view" for="QuestionContentMultipleChoice">
<%raise HoboError, "view of non-viewable field '#{this_field}' of #{this_parent.typed_id rescue this_parent}" unless can_view?%>
- <%= this.content %>
+ <%= this.content.to_html %>
<ul>
<repeat:options>
<li><%=this.content%></li>
diff --git a/config/environment.rb b/config/environment.rb
index 7792aad..bbd7b90 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -3,6 +3,7 @@ RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
+ config.gem 'bluecloth'
config.gem 'hobo'
config.time_zone = 'UTC'