After having something upgraded from underneath me (unfortunately, I’m not sure what), validation errors now print the following:
ActiveRecord::RecordInvalid: Validation failed: {{errors}}
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/validations.rb:1102:in `save_without_dirty!'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/dirty.rb:87:in `save_without_transactions!'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:182:in `transaction'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/transactions.rb:200:in `save!'
from (irb):34
from :0
I’m setting the error like this:
errors.add_to_base("outside edit window")
This used to work, what am I doing wrong? this is on rails 2.3.8.
see this link explaining the problem;
https://github.com/svenfuchs/i18n/issues/71
You should either downgrade your i18n gem to 0.3.3, or upgrade your Rails version > 2.3.8