views:

10

answers:

1

As one tiny part of making authoring html emails less painful, I'd like to be able to view what I'm making without sending it to myself. This will also help later, with an "Email not displaying correctly? View it in your browser!" link.

I'm working with Rails 3 (thus far ActionMailer 3.0 is a delight) and have an email model called "Notifications" with an action "new_composition". This sends correctly, but is currently quite ugly. I'd like to pretty it up without sending myself 37 emails.

I would expect localhost:3000/notifications/new_composition to get me there, but no route matches that. And I'm not good enough with my rails routing fu to figure it out (simply adding get "notification/new_composition" obviously isn't right, since the email model isn't a controller).

Danka.

A: 

I just made a controller called NotificationsController that supplies dummy variables for the values that the mailer model would usually supply. It works pretty well, though it seems a little wet (that is, not DRY) to me.

chadoh