My apologies if this is a basic question, but how will one go about
translating the following atom builder code (contained in
show.atom.builder) file to equivalent haml code?

atom_feed do |feed|
  feed.title(app_name + " Forum Topics")
  feed.updated(@forum.topics.first.created_at)

  for topic in @forum.topics
    feed.entry(topic, :url => forum_topic_url(@forum, topic.id)) do |
entry|
      entry.title(topic.name)
      firstBody = (topic.forum_posts_count > 0) ?
topic.posts.first.body : ''
      bdy = 'Posts in topic: ' + topic.forum_posts_count.to_s + '<br /
><br />' + firstBody
      entry.content(bdy, :type => 'html')

      entry.author do |author|
        author.name(topic.person.name)
      end
    end
  end
end
--~--~---------~--~----~------------~-------~--~----~
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