So I have a column name in my Order table named b_name
. However, when I get the error message, it says B name can't be blank
. My column b_name is an abbreviation for Business Name. Is it possible to change my column b_name
to be referenced as Business Name using locales. If so, could you please provide a tutorial or show me an example. I have tried a couple of ways such as this:
en:
activerecord:
models:
model_name: "Order"
attributes:
model_name:
b_name: "Business Name"
and that did not change the error message. I even tried this:
HUMANIZED_ATTRIBUTES = {
:lname => ""
}
def self.human_attribute_name(attr)
HUMANIZED_ATTRIBUTES[attr.to_sym] || super
end
but got an error message saying wrong number of arguments (2 for 1) on line #3
1: <% if object.errors.any? %>
2: <div id="error_explanation">
**3**: <h2><%= pluralize(object.errors.count, "error") %>
4: prohibited this <%= object.class.to_s.underscore.humanize.downcase %>
5: from being saved:</h2>
6: <p>There were problems with the following fields:</p>
Any suggesetions to help me accomplish my task?
Thanks in advance!