requiring is mega expensive, lets not do it every request.

This commit is contained in:
Sam 2013-03-10 07:13:52 -07:00
parent 3d7dfd3168
commit 22f8100919
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class Topic < ActiveRecord::Base
return title unless SiteSetting.title_fancy_entities?
# We don't always have to require this, if fancy is disabled
require 'redcarpet'
require 'redcarpet' unless defined? Redcarpet
Redcarpet::Render::SmartyPants.render(title)
end