ruby-on-rails-3.1 – 使用HAML的Rails HTTP流

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3.1 – 使用HAML的Rails HTTP流前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在rails中使用HAML项目的HTTP流似乎有问题.如果我使用ERB,它可以很好的工作.显然,我不是唯一一个有 this problem的人.

它不适用于将流放置在控制器顶部,或使用render:stream =>真正的行动.

如何让HAML和HTTP串流播放很好?

更新:我已经在宝石页面here上打开了一个问题.

解决方法

HAML尚未支持( source):

HTTP streaming is the sort of thing that would require a substantial
set of modifications to the core Haml engine. It’s only moderately
tricky to get it working even in basic cases,but when you factor in
things like the whitespace-eating operators it gets much more
difficult.

This isn’t something I’m opposed to in theory,but it’s also not something that’s high on my priority list given the difficulty of implementing it.

原文链接:https://www.f2er.com/ruby/271664.html

猜你在找的Ruby相关文章