문제
누구나 언급 된 멋진 방법을 취하는 방법을 알고 있습니다. 이것 튜토리얼과 스타일 시트 태그가 생성되도록하십시오 절대 URL?
해결책
그것을 알아 냈습니다.
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
광고대로 작동합니다. 멋진!
나는 오랜 세월 동안 이것을하고 싶었습니다. 이제 레일 덕분에 할 수 있습니다! 우후!
제휴하지 않습니다 StackOverflow