Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Mat Schaffer
RE: Not quite right [ reply ]  
2006-07-05 20:19
I just noticed the post about rcss at:
http://ragnarson.blogspot.com/2006/03/rcss-changes.html

I'll follow up there.

By: Mat Schaffer
Not quite right [ reply ]  
2006-07-05 15:56
I installed this and set it up per your instructions at http://rcss.rubyforge.org/, but it didn't get set up quite right. First, the controller didn't translate .css to .rcss. Second, the controller was distributing the file as text/html which could cause some problems.

This controller worked:
class RcssController < ApplicationController
def render_rcss
if params[:rcss] =~ /\.css$/
template = $`+".rcss"
else
template = params[:rcss]
end

headers["Content-Type"] = "text/css"
render :action => template, :type => 'rcss', :layout => false
end
end

Also, you might be thinking this already, but it would be great if the library enabled a user to just use a .rcss as easily as a .css rather than having to go through a seperate controller. Seems like it should be possible, but probably tricky.

Thanks for the work though! I'll try to take some time to look more closely at what you're doing, then post more constructive feedback.