Skip to content

Commit

Permalink
Updated ThemeController. Replaced calls to to_s with join('/') so tha…
Browse files Browse the repository at this point in the history
…t files located in subdirectories of /stylesheets, etc are accessible.

When no filename is passed in, the function receives an empty array, not nil.
  • Loading branch information
reidab authored and igal committed Jan 28, 2009
1 parent 3c7caec commit 50b037b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vendor/plugins/theme_support/lib/theme_controller.rb
Expand Up @@ -3,15 +3,15 @@ class ThemeController < ActionController::Base
after_filter :cache_theme_files

def stylesheets
render_theme_item(:stylesheets, params[:filename].to_s, params[:theme], 'text/css')
render_theme_item(:stylesheets, params[:filename].join('/'), params[:theme], 'text/css')
end

def javascript
render_theme_item(:javascript, params[:filename].to_s, params[:theme], 'text/javascript')
render_theme_item(:javascript, params[:filename].join('/'), params[:theme], 'text/javascript')
end

def images
render_theme_item(:images, params[:filename].to_s, params[:theme])
render_theme_item(:images, params[:filename].join('/'), params[:theme])
end

def error
Expand Down

0 comments on commit 50b037b

Please sign in to comment.