浏览 2055 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-02-09
<td class="ListActions"> <%= link_to '显示', :action => 'show', :id => product %><br /> <%= link_to '编辑', :action => 'edit', :id => product %><br /> <%= link_to 'Destroy', {:action => 'destroy', :id => product}, :confirm => "删除确认?",:post => true %><br /> </td> 这样写的话是正常的,但如果把 “Destroy” 改为 “删除” 就会出错 <td class="ListActions"> <%= link_to '显示', :action => 'show', :id => product %><br /> <%= link_to '编辑', :action => 'edit', :id => product %><br /> <%= link_to '删除', {:action => 'destroy', :id => product}, :confirm => "删除确认?",:post => true %><br /> </td> compile error ./script/../config/../app/views/admin/list.rhtml:24: parse error, unexpected tIDENTIFIER, expecting ')' _erbout.concat " "; _erbout.concat(( link_to '删除', {:action => 'destroy', :id => product}, ^ ./script/../config/../app/views/admin/list.rhtml:35: parse error, unexpected tIDENTIFIER, expecting ')' _erbout.concat(( link_to '新增商品', :action => 'new' ).to_s); _erbout ^ ./script/../config/../app/views/admin/list.rhtml:35: parse error, unexpected tIDENTIFIER, expecting ')' _erbout.concat(( link_to '新增商品', :action => 'new' ).to_s); _erbout ^ ./script/../config/../app/views/admin/list.rhtml:35: unterminated string meets end of file ./script/../config/../app/views/admin/list.rhtml:35: parse error, unexpected $, expecting ')' 引用 引用
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-02-09
看一看网页的语言设置是否是utf-8? ror对中文支持不太好。
|
|
返回顶楼 | |
发表时间:2007-02-09
http://www.iteye.com/topic/38773
|
|
返回顶楼 | |
发表时间:2007-02-09
我使用的是ruby1.8.5
rails为1.2.1 默认的编码已经是utf-8的了,也不是不支持中文,如果我把“删除”改为“其它”也不会发生错误,实在弄不明白是为什么 |
|
返回顶楼 | |