billhorsman / inline_styles_mailer

Inline Styles Mailer Gem
MIT License
14 stars 11 forks source link

Is there a way to force CSS reload in the rails preview #7

Open DannyBen opened 9 years ago

DannyBen commented 9 years ago

I am using the rails mailer preview to view my mailer output when designing. I am opening a url like this in the browser: http://localhost:3000/rails/mailers/notifier/invitation

The CSS styles are properly inlined, but when I change something in the CSS, the preview does not change.

I am using a stylesheet_path 'app/assets/stylesheets/mailers' and the only way to force reload, is to change this line to something else (that does not exist) and then change it back - only then, the HTML is regenerated properly.

(BTW - since the rails preview is using an iframe, I also tried loading it with the "liberated" iframe, same result).

Is this a bug? Is there another, better way to preview the HTML mail while designing it?

Thanks (and other than this little thing, great gem).

billhorsman commented 9 years ago

I don't make much use of the mailer previews, but I probably should. I tend to send pretend mails from the console to mailcatcher. I'll have a dig around and see what I find.

DannyBen commented 9 years ago

Im also using a mailcatcher, but this makes for a much longer debug cycle than the preview.