在rails中使用HAML项目的HTTP流似乎有问题.如果我使用ERB,它可以很好的工作.显然,我不是唯一一个有
this problem的人.
它不适用于将流放置在控制器顶部,或使用render:stream =>真正的行动.
如何让HAML和HTTP串流播放很好?
解决方法
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.