text formatting setting cached at controller level
git-svn-id: http://redmine.rubyforge.org/svn/trunk@375 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0125ec3b48
commit
3cd50da3b0
|
@ -127,7 +127,8 @@ module ApplicationHelper
|
||||||
text = text.gsub(/r(\d+)(?=\b)/) {|m| "\"r#{$1}\":" + url_for(:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1) } if @project
|
text = text.gsub(/r(\d+)(?=\b)/) {|m| "\"r#{$1}\":" + url_for(:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1) } if @project
|
||||||
|
|
||||||
# finally textilize text
|
# finally textilize text
|
||||||
text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? auto_link(RedCloth.new(text, [:filter_html]).to_html) : simple_format(auto_link(h(text)))
|
@do_textilize ||= (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize")
|
||||||
|
text = @do_textilize ? auto_link(RedCloth.new(text, [:filter_html]).to_html) : simple_format(auto_link(h(text)))
|
||||||
end
|
end
|
||||||
|
|
||||||
def error_messages_for(object_name, options = {})
|
def error_messages_for(object_name, options = {})
|
||||||
|
|
Loading…
Reference in New Issue