title TestApp = stylesheet_link_tag 'error', media: 'all' body p 404.html # config/initializers/assets.rb Rails.application.config.assets.precompile << 'error.css'
= Logger.new(STDOUT) %w(404 422 500 503).each do |status_code| pattern = Rails.public_path.join("assets/#{status_code}-*.html") src = Pathname.glob(pattern).sort_by { |path| path.mtime }.last next if src.nil? dest = Rails.public_path.join("#{status_code}.html") logger.info("mv #{src} to #{dest}") FileUtils.mv(src, dest) end end digestΛऔΓআ͍ͯ public/ҎԼʹҠ͢