I haven't been able to reproduce the issue that you have been having (on 2.3.2). I created a test suite for your model. Can you run that to see if you get the same problem.
http://gist.github.com/141740 Requires mocha, update references to fixtures and fields as required. It's based on the migration and model you provided. HTH, Nicholas On Jul 5, 11:59 pm, Learn by Doing <[email protected]> wrote: > Colin: > > Below are the relevant code. Thanks for your help. > > class CreateStats < ActiveRecord::Migration > > def self.up > create_table :stats do |t| > > t.integer :user_id, :null => false > t.string :aspect, :null => false, :default => "default > aspect" > > t.timestamps > end > end > > def self.down > drop_table :stats > end > end > > class Stat < ActiveRecord::Base > > belongs_to :user > validates_presence_of :user_id > validates_associated :user > > validates_uniqueness_of :aspect, :scope => :user_id > > attr_readonly :user_id, :aspect > > end > > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

