views:

40

answers:

1

I'm building a template system for a CMS in Rails 3, with each template placed in {application_root}/templates/{template_name}/.

For each template I would like to have a public-directory that overrides the standard one. How can it be done?

A: 

You need define the paths.public in config/application.rb

shingara
I have tried setting `paths.public = File.join(Rails.root, "templates/#{template}/public/")` but I get `Exiting/Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta4/lib/rails/paths.rb:16:in 'method_missing': undefined method 'javascripts' for #<Rails::Paths::Path:0x10207bf18> (NoMethodError)`.
Christoffer
You need define a fix value. Not modify in each request
shingara