Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActionMailer <% if -%> inside <% for -%>

#2588

When using an <% if true -%> construct inside a <% for x in y -%> loop in an ActionMailer view template extra lines and spurious '=' characters are injected into the output.


<% if true -%>
  <%= "print this" %>
<% end -%>

<% for y in @x -%>
  <% if true -%>
    <%= "print this" %>
  <% end -%>
<% end -%>

gives this:

  print this

                                                                         =
                                 print this
              =

Reported by James B. Byrne · April 30th, 2009 @ 08:30 PM

State: invalid
Milestone: 3.x
Assigned to: Ryan Bigg Ryan Bigg
Importance: Low

Activity

  1. Ryan Bigg
    Ryan Bigg
    • State changed from new to incomplete

    This needs to be confirmed as a bug and a patch to be written if it is.

    April 29th, 2010 @ 10:31 PM

  2. James B. Byrne
    James B. Byrne
    • Tag changed from 2.3.2, actionmailer, bug, template, view to 2, actionmailer, bug, template, view

    I am curious about the date that this issue claims to have been opened, 2010 April 29. As I recall, I reported this about a year ago but in any case it certainly was not yesterday.

    April 30th, 2010 @ 01:54 PM

  3. James B. Byrne
    James B. Byrne

    I am going from memory here as I can no longer find my notes or email exchanges regarding this subject. Sic transit ephemera.

    As I recall, I did not consider that TMail includes all of the space found in the view template lines that get expressed when the variable is filled in. When the length of the resulting line exceeds 80 characters, or whatever the line limit is in TMail, the line is broken into two and wraps. The = character is what the mail reader displays for such breaks.

    So, I no longer consider this a bug as such, just a confusing intersection of coding and output.

    April 30th, 2010 @ 03:49 PM

  4. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  5. Dan Pickett
    Dan Pickett
    • Assigned user set to Ryan Bigg

    based on the commentary above, this can be marked as "wontfix" or "invalid"

    May 9th, 2010 @ 06:09 PM

  6. Ryan Bigg
    Ryan Bigg
    • State changed from incomplete to invalid

    May 9th, 2010 @ 10:29 PM

  7. Andrea Campi
    Andrea Campi
    • Tag changed from 2, actionmailer, bug, template, view to actionmailer, bug, template, view
    • Importance changed from to Low

    October 16th, 2010 @ 11:42 PM