سؤال

I have an inherited project using the creole gem (0.5.0).

In my view this line seems to break but I can't find out anything about it:

<%= WikiCreole.creole_parse(@a.content) %>

The error message is NameError in Knowledgebase_article#view uninitialized constant ActionView::Base::CompiledTemplates::WikiCreole. If this line is removed then the page will render fine.

The problem is I can't seem to find out much about the error anywhere so I was hoping that someone on SO would know where to start.

هل كانت مفيدة؟

المحلول

Please try <%= Creole.creolize(@a.content)%>

Thanks

نصائح أخرى

Just found the answer as to why my specific setup wasn't working, first of all I hadn't installed the WikiCreole gem, so:

gem install WikiCreole

Then, I was missing the require statement from my model:

require 'wiki_creole'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top