0
我爲Rails 3中的CMS構建了一個模板系統,每個模板放置在{application_root}/templates/{template_name} /中。覆蓋Rails 3中的公共目錄?
對於每個模板,我想要一個覆蓋標準目錄的公共目錄。如何做呢?
我爲Rails 3中的CMS構建了一個模板系統,每個模板放置在{application_root}/templates/{template_name} /中。覆蓋Rails 3中的公共目錄?
對於每個模板,我想要一個覆蓋標準目錄的公共目錄。如何做呢?
您需要配置定義paths.public
/application.rb中
我已經嘗試設置'paths.public = File.join(Rails.root, 「模板/#{}模板/公關/」)'但是我'退出 /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta4/lib/rails/paths.rb:16:in'method_missing':未定義的方法'javascripts'爲#(NoMethodError)'。 –
Christoffer
2010-08-09 13:46:47
您需要定義一個修復值。不要在每個請求中修改 – shingara 2010-08-09 14:57:30