Hi!
I am using Rails3.0.0.rc and get an error which do not occur on
Rails2.3.5
In my model I have:
validates :title, :presence => true, :uniqueness => true
when I start up the console and enter:
x=Blog.new
x.valid? --> false
x.errors --> OrderedHash{:title => ["can't be blank"]}
x.title="an_existing_title"
x.valid? --> false
x.errors --> OrderedHash{:title=> ["translation missing: en,
activerecord, errors, models, blog, attributes, title, taken"]}
In Rails2.3.5 this error does not occur. ("title has already been
taken")
Is this an i18n error or is this a rails3.0.0.rc error?
on 2010-08-06 17:10
on 2010-08-06 18:58
Sorry for blaming I18n or Rails, it was a very strange error caused by another gem. http://github.com/joekhoobyar/composite_primary_ke... ( record.errors.add(attribute, :taken, :value => value) solves that issue ) *SOLVED* :)
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.