Module: TooRendermonkeyCss
- Defined in:
- lib/too_rendermonkey/too_rendermonkey_css.rb
Instance Method Summary collapse
Instance Method Details
#stylesheet_tag_pdf(stylesheet) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/too_rendermonkey/too_rendermonkey_css.rb', line 5 def stylesheet_tag_pdf stylesheet begin css_file = "" File.open("#{Rails.root.to_s}/public/stylesheets/#{stylesheet}.css", "r") {|f| css_file = f.read } "<style type=\"text/css\"> #{css_file} </style>".html_safe rescue => err puts err. "<style type=\"text/css\"></style>".html_safe end end |