All right i had been staring at the Haml::Engine render doc for 2
hours and had some insight right after the post.  Here are fragments
of working code.



# haml template
%li
        %h3= name
        %p= image_url

# render code fragment
                        test_data = [ {:name => 'Alice Brown', :image_url => 
'/alice/
brown'},
                                {:name => 'Chris Dent', :image_url => 
'/chris/dent'},
                                {:name => 'Ellen Fargo', :image_url => 
'/ellen/fargo'},
                                {:name => 'Grant Hume', :image_url => 
'/grant/hume'} ]
                        return test_data.inject('') do |all_persons, person|
                                all_persons << " 
#...@haml_engine.render(Object.new,{:name =>
person[:name], :image_url => person[:image_url]})}"
                        end

# html from render
       <li>
        <h3>Alice Brown</h3>
        <p>/alice/brown</p>
      </li>
       <li>
        <h3>Chris Dent</h3>
        <p>/chris/dent</p>
      </li>
       <li>
        <h3>Ellen Fargo</h3>
        <p>/ellen/fargo</p>
      </li>
       <li>
        <h3>Grant Hume</h3>
        <p>/grant/hume</p>
      </li>

-- 
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