This is the direction I'm trying to go, but I can't get it to work with namespaced models.
class Surveys::Hospital::JobMatch < ActiveRecord::Base
has_many :job_match_answers,
:class_name => "Surveys::Hospital::JobMatchAnswer",
:foreign_key => "surveys_hospital_job_match_id"
validates_presence_of :job_match_answers
end
I'd like the users to see "Job titles" instead of "Job match answers" in the error message. I tried changing this in config/locales/en.yml. I've tried several combinations.
1) Nested namespaces
en:
activerecord:
attributes:
surveys:
hospital:
job_match:
job_match_answers: "Job titles"
2) Inline namespaces
en:
activerecord:
attributes:
surveys_hospital_job_match:
job_match_answers: "Job titles"
3) No namespaces
en:
activerecord:
attributes:
job_match:
job_match_answers: "Job titles"
Nothing works. How do I do this with namespaced models?