Rails: Tidy Stylesheets
1 answer
Found it out.
In what's going on in application_helper.rb:
def get_stylesheets
stylesheets = [] unless stylesheets
["http://www.example.com/stylesheets/#{controller.controller_path}/#{controller.action_name}"].each do |ss|
stylesheets << ss if File.exists? "#{Dir.pwd}/public/stylesheets/#{ss}.css"
end
end
Works as advertised. Nice!
I've wanted to do this for ages - now thanks to Rails I can! Woohoo!
0
source to share