本文介绍了:entry_name不会更改will_paginate;不工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么条目名称没有更改为我想要的名称吗?

Does anyone know why the entry name isn't changing to what I want?

<div class="digg_pagination">
  <div class="page_info">
    <%= page_entries_info @user_prices, :entry_name => 'Price', :plural_name => 'Prices' %>
  </div>
    <%= will_paginate @user_prices, :container => false %>
</div>

我已经尝试摆脱:plural_name选项,但这也不起作用.可能是什么问题?

I already tried getting rid of the :plural_name option but that didn't work either. What could be the problem?

推荐答案

看起来它只是一个bug,因此我只是进入翻译文件并执行以下操作:

Looks like its just a bug for will paginate so I just went into the translation file itself and did the following:

config/en.yml

en:
  activerecord:
    models:
      user_price:
        zero:  Prices
        one:   Price
        few:   Prices
        other: Prices

这篇关于:entry_name不会更改will_paginate;不工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 12:26