[Rails] Including CSS from a stylesheet file in a an e-mail

Ashley Moran
Fri, 18 Aug 2006 14:49:53 -0000

On Friday 18 August 2006 12:19, Chris Hall wrote:
> you''ll most likely have to have the css either
''hard-coded'' in the
> resulting html within style tags or make sure the link reference is a
> full URL, ie, http://www.yoursite.com/stylesheets/print.css and URI is
> publically accessible.
>
>
> ...
>
>
> or
>
> <link ref="stylesheet" type="text/css"
> href="http://www.yoursite.com/stylesheets/print.css"/>
>
> using stylesheet_link_tag won''t do it as it does not include the
> hostname in the href attribute.


Thanks

Eventually we got it working with
  <%= IO.read("public/stylesheets/print.css") %>

I was hoping there''d be a helper function or something to handle this
but I
guess the solution is pretty simple.


Ashley

--
"If you do it the stupid way, you will have to do it again"
  - Gregory Chudnovsky