我开始使用学习轨道“敏捷Web开发使用Rails,第4版”
与
rails 3.2.7
和ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
。
当我尝试使用
<%= f.text_area :description :rows=>6 %>
它返回了一个错误
/media/ashku/New Volume/RoR/depot/app/views/products/_form.html.erb:19: syntax error, unexpected ':', expecting ')'
...= ( f.text_area :description :rows=>6 );@output_buffer.safe...
然后我尝试更改:rows=>6 to rows: 6
但结果相同的地方
这里的讨论建议将其视为JSON问题
控制器代码在这里给出
那么如何解决这个问题呢?
您错过了标记名称即(:description)后的逗号(,)。因此,将标签替换为以下标签并尝试运行。
<%= f.text_area :description, :rows => 6 %>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句