Forum: Ruby on Rails Working with css

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.
3275da7fdbd73cb4e7956fd0d29164de?d=identicon&s=25 Paul Bergstrom (palb)
on 2006-05-24 23:25
How do you work with css in Rails? Do I use it in the view-pages, the
normal way? Or can a modify the predefined methods, like text_field()?
39b36b2be47228f8619d61ea7a607a25?d=identicon&s=25 Matthew Beale (mixonic)
on 2006-05-24 23:35
(Received via mailing list)
> How do you work with css in Rails? Do I use it in the view-pages, the
> normal way? Or can a modify the predefined methods, like text_field()?

Well, redefining text_field would mean repeating the same style over and
over, and thereby eliminating the ability to cache you entire style
settings.  You should probably use public/stylesheets/ and the
appropriate
helpers to link.

Image paths in the CSS document get screwed up if you have a webserver
root different than the one used in production (say, you develop on
webrick but deploy in www.foo.com/my_rails_app/), but you could fix that
with a proper deployment script.

Good Luck!

--
Matthew Beale :: 607 227 0871
Resume & Portfolio @ http://madhatted.com
This topic is locked and can not be replied to.