I can send html emails using the new layouts feature using inline style, there is no problem to get a nice display.. but what if ? i would like to link to a css file , .. which king of link ? to public/stylesheets/email.css if there is any relative image in the css for a background url ? like #header { background: #ffcc00 url(../../../images/logo.png) no-repeat 2px; } thanks for you help ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jan 15, 2009 at 3:43 AM, Kad Kerforn <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> i would like to link to a css file , .. which king of link ? to > public/stylesheets/email.cssNothing to do with RoR, but you need to provide absolute, complete URLs, e.g. ''http://example.com/stylesheets/email.css''.> if there is any relative image in the css for a background url ?Same deal,> background: #ffcc00 url(http://example.com/images/logo.png) no-repeat 2px;HTH, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hassan Schroeder wrote:> On Thu, Jan 15, 2009 at 3:43 AM, Kad Kerforn > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> i would like to link to a css file , .. which king of link ? to >> public/stylesheets/email.css > > Nothing to do with RoR, but you need to provide absolute, complete > URLs, e.g. ''http://example.com/stylesheets/email.css''. > >> if there is any relative image in the css for a background url ? > > Same deal, > >> background: #ffcc00 url(http://example.com/images/logo.png) no-repeat 2px; > > HTH, > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgThanks a lot ... I''ll stop my tests... (was trying various option) ;-)) ! btw: discovered a bug using multiparts with layout ( the plain text get the html source code..) with a nice trick to be inserted in the environment.rb ... in case someone reads this post module ActionMailer class Base private def candidate_for_layout?(options) (!options[:file] || options[:file].content_type != ''text/plain'') && !@template.send(:_exempt_from_layout?, default_template_name) end end end thanks again ! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---