I have an Active Record model in Rails 2.1 that is doing some validation, specifically, these methods:
validates_presence_of :name, :email, :phone validates_uniqueness_of :name validates_format_of :email, :with => /.+@.+\..{2,4}/ validates_confirmation_of :password validate :has_password attr_accessor :password
When I try to save a user object that does not meet all of these requirements, the object does not save, but there are no errors either.
Loading development environment (Rails 2.1.0)
user = User.new
=> #<User id: nil, name: nil, email: nil, hashed_password: nil, salt: nil, phone: nil, created_at: nil, updated_at: nil>
user.save
=> false
user.errors[:name]
=> nil
Any idea what's going on?