Forum: Ruby on Rails Targeting the public/images directory?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Elliott G. (Guest)
on 2009-04-14 01:57
(Received via mailing list)
I am altering the default scaffold.css inside of public/stylesheets to
include this:

td {
/*  background-image:url(../../../public/images/product_bkgrnd1.png); /
*
/*  background-image:url(../public/images/product_bkgrnd1.png);*/
}

How do I target the file public/images/product_bkgrnd1.png so that it
will render in a View's <td> as specified in the scaffold.css.

I have tried a few different paths as you can see above, but no love
yet.

Thanks for helping out the rookie here.
Hassan S. (Guest)
on 2009-04-14 02:03
(Received via mailing list)
On Mon, Apr 13, 2009 at 2:56 PM, elliottg <removed_email_address@domain.invalid> 
wrote:
> How do I target the file public/images/product_bkgrnd1.png so that it
> will render in a View's <td> as specified in the scaffold.css.

td { background-image: url( "/images/product_bkgrnd1.png" ); }

HTH,
--
Hassan S. ------------------------ removed_email_address@domain.invalid
Elliott G. (Guest)
on 2009-04-14 02:16
(Received via mailing list)
Perfect!

Thanks a ton.

Elliott

On Apr 13, 6:02 pm, Hassan S. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.