Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:04:16+00:00 2026-06-01T07:04:16+00:00

I am generating an email with dynamic content from a Haml template which parses

  • 0

I am generating an email with dynamic content from a Haml template which parses info from an array.

Basically, the Haml receives an array filled with several hashes. In the code I have a block which looks like this:

%table 
  =arrayname.each do |object|
    %tr
      %td= object.name
      %td= object.link

Whenever the email is sent the entire object arrayname is included at the bottom of the HTML. This causes [#,#] (more # when there are more objects) to show up at the top of the block. There is no way to manipulate this piece of text with CSS, else I would’ve just hidden it.

[#<Release @id=181 @title="test" @amurl="test.com" @iturl="test.com" @cover="test.com" @date="2012-03-28" @artist_name="Test">, #<Release @id=182 @title="test" @amurl="test.com" @iturl="test.com" @cover="" @date="2012-03-31" @artist_name="Test">]

The line is identical to the results shown when executing the code in IRB.

Can anyone tell me how to prevent this from happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:04:17+00:00Added an answer on June 1, 2026 at 7:04 am

    With Haml, you don’t need to use an = for arrayname.each because that’s Ruby code you want run, but not displayed. To just run code, use a hyphen.

    Instead, this should work:

    %table 
      - arrayname.each do |object|
        %tr
          %td= object.name
          %td= object.link
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a CMS system, which has a template for generating forms, with
i m generating a pdf file from the contents of email and that email
I have a third party program which basically allows users to send email and
I'm generating a email from a web page and taking a section of the
Trying to use a php generating the email address using the ID eg: peopleID
We're building a module for generating HTML for email newsletters. We've looked into using
When generating models from postgresql with ColdFusion Illudium Code generator the boolean values get
I want to generate Email from my ruby application, So i used Action mail
We're looking for a fast, flexible way of generating templated content (in this case
In my app I'm generating an email with a time stamp... The iPhone mail

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.