lib/haml/helpers/action_view_mods.rb in haml-4.0.0 vs lib/haml/helpers/action_view_mods.rb in haml-4.0.1.rc.1

- old
+ new

@@ -80,22 +80,33 @@ alias_method :content_tag_without_haml, :content_tag alias_method :content_tag, :content_tag_with_haml end - class InstanceTag - # Already includes TagHelper + module HamlSupport include Haml::Helpers def haml_buffer @template_object.send :haml_buffer end def is_haml? @template_object.send :is_haml? end + end + if ActionPack::VERSION::MAJOR == 4 + module Tags + class TextArea + include HamlSupport + end + end + end + + class InstanceTag + include HamlSupport + def content_tag(*args, &block) html_tag = content_tag_with_haml(*args, &block) return html_tag unless respond_to?(:error_wrapping) return error_wrapping(html_tag) if method(:error_wrapping).arity == 1 return html_tag unless object.respond_to?(:errors) && object.errors.respond_to?(:on) @@ -138,10 +149,6 @@ end alias_method :form_for_without_haml, :form_for alias_method :form_for, :form_for_with_haml end end -end - -if ((ActionPack::VERSION::MAJOR == 3) && (ActionPack::VERSION::MINOR >= 2) && (ActionPack::VERSION::TINY >= 3) || (ActionPack::VERSION::MAJOR == 4)) - require "haml/helpers/rails_323_textarea_fix" -end +end \ No newline at end of file