Thanks Matt,

Its always the simplest of things that stump you for hours :)

Dean

On Jul 1, 9:42 pm, Matt Jones <[email protected]> wrote:
> On Jul 1, 2010, at 12:11 AM, Dean wrote:
>
>
>
> > This problem has me stumped.  When sending plain text emails they are
> > including newlines before and after each Ruby segment
>
> > My erb is:
> > -------
> > Dear <%= @user %>,
>
> > To activate your account for <%= @app_name %>, please click on this
> > link:
>
> >  <%= @url %>
>
> > Thank you,
>
> > The <%= @app_name %> team.
> > ----------------
>
> > But the resulting email is:
> > -----------
> > Dear Test User,
>
> > To activate your account for
> >  Waterwatch
> > , please click on this link:
>
> >  http://localhost:3000/users/32-test-user/activate?key=158e23261f7be2d...
>
> > Thank you,
>
> > The
> >  Waterwatch
> > team.
> > ---------
>
> > My understanding is that ERB inserts these newlines by default and
> > they can be disabled by including a trim_mode attribute in the call
> > the erb, but how do you do this in ActionMailer?
>
> These aren't actually ERB's fault - the newlines + spaces you're
> getting are leftovers from the app-name tag definition, which I
> suspect looks like:
>
> <def tag="app-name">
>    Waterwatch
> </def>
>
> in your application.dryml. Defining it as:
>
> <def tag="app-name">Waterwatch</def>
>
> should get rid of the extra whitespace.
>
> --Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to