Class: ThemesupportController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/theme_support/themesupport_controller.rb

Overview

The controller for serving/cacheing theme content…

Instance Method Summary collapse

Instance Method Details

#errorObject



20
21
22
# File 'lib/theme_support/themesupport_controller.rb', line 20

def error
  render :nothing => true, :status => 404
end

#imagesObject



16
17
18
# File 'lib/theme_support/themesupport_controller.rb', line 16

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

#javascriptObject



12
13
14
# File 'lib/theme_support/themesupport_controller.rb', line 12

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

#stylesheetsObject

after_filter :cache_theme_files



8
9
10
# File 'lib/theme_support/themesupport_controller.rb', line 8

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