Respected ppl …
I have many models, one example is as below :
class State < ActiveRecord::Base
attr_accessible :state_name
belongs_to :location
validates_uniqueness_of(:state_name)
validates_presence_of(:state_name)
end
i want to add error message globally for the uniqueness of attributes …
en:
hello: "Hello world"
errors:
messages:
taken: "अद्वितीय होना चाहिए/Data Already Exists"
blank: "रिक्त नहीं किया जा सकता है/can't be blank"
The one for blank is working perfectly but the taken is still not working & i still get the default “has already been taken” error message …
Kindly help …
Sincere Regards
-Sky
got it solved … I replaced my en.yml file with the one provided here : raw.github.com/svenfuchs/rails-i18n/master/rails/locale/en.yml and replaced the “blank” and “taken” from this file as suited by me … Everything is working now 😀 ….
Regards -Sky