check if we can all cleaned_is_rtl? before doing it in direction_for helper

This commit is contained in:
MrZYX 2011-05-12 11:05:32 +02:00
parent ec99b59814
commit 9f070593ff

View file

@ -311,6 +311,7 @@ module ApplicationHelper
end end
def direction_for(string) def direction_for(string)
return '' unless string.respond_to?(:cleaned_is_rtl?)
string.cleaned_is_rtl? ? 'rtl' : '' string.cleaned_is_rtl? ? 'rtl' : ''
end end