I frequently write my own Ruby methods that take a block and return a
string.

    TidyTable.new(@data).to_html do |record|
      record.title
    end

This worked fine in Haml 2 like this:

    = TidyTable.new(@data).to_html do |record|
      - record.title

But now it tells me "TidyTable block expects an Array or Hash, but a
Fixnum was returned." It appears that Haml is trying to turn all block
content into strings.

I can fix it by using curly braces on the same line, but that's a
hack. It should work with a regular Ruby block.

Is this a bug? How should I go about fixing it in Haml 3?

Details:

Haml 3.0.10
Rails 2.3.2
RubyGems 1.3.7
Ruby 1.8.7

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to