[typo] send_file problem?

rob lucas roblucas at lucasandblench.com
Wed Dec 19 13:08:48 EST 2007

I see that typo uses routing to deal with the switching that goes on between
different themes...

  map.connect 'stylesheets/theme/:filename',
    :controller => 'theme', :action => 'stylesheets', :filename => /.*/

... which takes us to the stylesheets action of the themes controller...

  def stylesheets
    render_theme_item(:stylesheets, params[:filename], 'text/css;

... which uses the render_theme_item action...

    send_file(this_blog.current_theme.path + "/#{type}/#{file}",
              :type => mime, :disposition => 'inline', :stream => false)

... which uses "send_file" to serve the theme files from within the
framework to the outside world, as if they were in the public directory.

BUT... This is broken on my installation. The theme files simply don't show
up, so I get a nice unstyled blog. I only managed to get it to work by
simply copying the theme files into the public directory, which is not
ideal. Anyone know what is wrong here?

I'm using Typo 4.1, Rails 1.2.0, & Ruby 1.8.5


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/typo-list/attachments/20071219/b7728ac6/attachment.html 

More information about the Typo-list mailing list