Reputation: 461
I'm new to rails so maybe I'm missing something here but I am getting the following error when trying to use pluralizer in my form.
undefined method `pluralizer' for #<#<Class:0x00000002f76528>:0x000000054a5ec0>
Here is the section in the form
<h2><%= pluralizer(normal_hour.errors.count, "error") %> prohibited this normal_hour from being saved:</h2>
<ul>
<% normal_hour.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
Do I need to do a include ActionView::Helpers::TextHelper somewhere?
Upvotes: 0
Views: 59
Reputation: 909
The method is pluralize
and not pluralizer
.
Read more about it here
Also, you do not need to include ActionView::Helpers::TextHelper
unless you would like to use pluralize
in a model. Check this question
Upvotes: 1