Permalink
Browse files

Make show_for compatible with both ERB and HAML, but tests fail...

  • Loading branch information...
1 parent cabd32d commit 0503c547b4595ab5545ecfb18aa0277e8b853e0c @grimen grimen committed Jan 8, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/show_for/helper.rb
@@ -15,9 +15,7 @@ def show_for(object, html_options={}, &block)
html_options[:id] ||= dom_id(object)
html_options[:class] = "show_for #{dom_class(object)} #{html_options[:class]}".strip
- concat(content_tag(tag, html_options) do
- yield ShowFor::Builder.new(object, self)
- end)
+ content_tag(tag, yield(ShowFor::Builder.new(object, self)), html_options)
end
end
end

0 comments on commit 0503c54

Please sign in to comment.