Sha256: 2cd6b7a80798193efde0a046b184099e3b5cb61ab42505527f729eda44c54480
Contents?: true
Size: 568 Bytes
Versions: 25
Compression:
Stored size: 568 Bytes
Contents
class CustomTemplatesController < ApplicationController layout nil session :off caches_page :xslt def stylesheets render_template('css', 'text/css') end def xslt render_template('xslt', 'application/xml') end private def render_template(type, mime_type) template = CustomTemplate.find(:first, :conditions => { :name => params[:id], :template_type => type }) if(template) render(:text => template.content, :content_type => mime_type) else render(:nothing => true, :status => 404) end end end
Version data entries
25 entries across 25 versions & 1 rubygems