0

我安装了will_paginate-bootstrapgem 并将其添加到我的模板中

<%= will_paginate, renderer: BootstrapPagination::Rails %>

现在我的测试失败了

Failure/Error: visit users_path
     ActionView::Template::Error:
       /Users/user/dev/rails/my/app_rails/app/views/users/index.html.erb:10: syntax error, unexpected tLABEL, expecting '='
       ...end= ( will_paginate, renderer: BootstrapPagination::Rails )...
       ...                               ^
     # <internal:prelude>:10:in `synchronize'
     # ./spec/requests/user_pages_spec.rb:24:in `block (4 levels) in <top (required)>'

这条消息是什么意思?如何修复损坏的测试?

4

2 回答 2

0

That code is using the Ruby 1.9 hash syntax. Are you still on 1.8 by chance?

于 2013-02-19T11:55:28.650 回答
0

括号固定问题<%= will_paginate(:renderer => BootstrapPagination::Rails) %>

于 2013-02-19T12:37:21.840 回答