class TranslationKey < ActiveRecord::Base
  has_many :key_values
  has_many :translation_values, :through => :key_values
  validates_uniqueness_of :name, :message => "already exist in another
key"
end

class TranslationValue < ActiveRecord::Base
  has_many :key_values
  has_many :translation_keys, :through => :key_values
  has_many :languages
  validates_presence_of :text, :message => "can't be empty"
end

in my update action of Key, if the key has non-valid value object I
see this error message:
"Translation values is invalid"

why don't I see:  "already exist in another key" instead?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to