LearningRoR
LearningRoR

Reputation: 27222

:entry_name does not change for will_paginate; not working?

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?

Upvotes: 0

Views: 723

Answers (2)

Shadwell
Shadwell

Reputation: 34774

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' %>

Upvotes: 12

LearningRoR
LearningRoR

Reputation: 27222

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

Upvotes: 2

Related Questions