I changed the attributes name in en.yml file in ruby on rails project. The buttons are working fine. But the field attributes is not changing.
Here is my model,
class Enr::AffordableWarmth < ActiveRecord::Base
self.table_name = "AffordableWarmth"
self.primary_key = 'Record_No'
validates_presence_of :No_Bedrooms, :No_Bedspaces, :Max_Annual_Energy_Cost
validates :No_Bedrooms, uniqueness: { scope: :No_Bedspaces,
message: "already exists!" }
validates_numericality_of :No_Bedrooms, :No_Bedspaces, :Max_Annual_Energy_Cost
end
en-GB.yml file
en-GB:
helpers:
submit:
enr_rds_dea:
create: 'Create new user'
update: 'Update'
enr_affordable_warmth:
create: 'Create'
update: 'Update'
activerecord:
models:
AffordableWarmth:
attributes:
AffordableWarmth:
No_Bedrooms: "Number of Bedrooms"
Still, in the rails console and in the form it displays 'No Bedrooms could not be blank'. Bit of code is not working from the activerecord. Before bit of code is working fine.