开发者

Collection Select in HAML fails to wrap correctly

开发者 https://www.devze.com 2023-01-11 23:36 出处:网络
Does anyone know why %select{:name => \"dropdown\"} expand » - for say_text in @available_says %option = h say_text

Does anyone know why

%select{:name => "dropdown"} expand »
- for say_text in @available_says
%option = h say_text

in HAML resolves to

<select name='dropdown'></select>
<option>a</option>
<option>b</option>
<option>c</option>

in HTML? It's stymieing my dropdown completely and the documentation all s开发者_开发技巧ays "That should work." I can't indent the third line properly because the HAML code explodes at that point. This is in Rails 2.3.8, btw.


You need to reflect the document structure with correct indentation.

%select{:name => "dropdown"}
  - for say_text in @available_says
    %option= h say_text
0

精彩评论

暂无评论...
验证码 换一张
取 消