The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Tried Printing Screens From Your Rails App Lately?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Obie Fernandez

Posts: 608
Nickname: obie
Registered: Aug, 2005

Obie Fernandez is a Technologist for ThoughtWorks
Tried Printing Screens From Your Rails App Lately? Posted: Feb 15, 2007 3:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Obie Fernandez.
Original Post: Tried Printing Screens From Your Rails App Lately?
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Obie Fernandez
Latest Posts From Obie On Rails (Has It Been 9 Years Already?)

Advertisement

Here's a quick tip about printing, stylesheets and Ruby on Rails applications. I'm betting most of you use the default form of stylesheet_link_tag. See the example usage from the API documentation:

stylesheet_link_tag "style" # =>
    <link href="/stylesheets/style.css" media="screen" rel="Stylesheet" type="text/css" />

Notice that the Rails helper defaults to inserting a media="screen" attribute into your link tag. The practical implication is that printing will lack a stylesheet (and probably look really bad.)

You have two choices: 1) tack :media => "all" onto the end of that helper method call, so that the same stylesheet is used when printing or 2) write a print stylesheet.


Tired of your job? Need to hire developers? Visit DZone Jobs: great people, great opportunities.

Read: Tried Printing Screens From Your Rails App Lately?

Topic: Serial rubinius interview: Episode VII Previous Topic   Next Topic Topic: JRuby: Rails Support Status Update

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use