问题
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>
I already tried getting rid of the :plural_name
option but that didn't work either. What could be the problem?
回答1:
At some point the :entry_name
option in page_entries_info
has changed to :model
.
So you can now do (in 3.0.2 at least):
<%= page_entries_info @user_prices, :model => 'Price' %>
回答2:
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
来源:https://stackoverflow.com/questions/8136835/entry-name-does-not-change-for-will-paginate-not-working