diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/erb.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb index 4e80c4f456..aa8eac7846 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -37,10 +37,6 @@ module ActionView end end - class ErubisWithPercentLine < Erubis - include ::Erubis::PercentLineEnhancer - end - class ERB # Specify trim mode for the ERB compiler. Defaults to '-'. # See ERB documentation for suitable values. @@ -80,12 +76,10 @@ module ActionView # Always make sure we return a String in the default_internal erb.encode! - mode = self.class.erb_trim_mode.to_s - implementation = self.class.erb_implementation - if mode.include? "%" and implementation == Erubis - implementation = ErubisWithPercentLine - end - implementation.new(erb, :trim => mode.include?("-")).src + self.class.erb_implementation.new( + erb, + :trim => (self.class.erb_trim_mode == "-") + ).src end private |