Wonky Validation, attr_accessor

# I have a somewhat basic question, I have my User Model with the following attributes:

Here's how it should look like:

class User < ActiveRecord::Base

validates_length_of :password, :within => 5..40 validates_uniqueness_of :email

validates_presence_of :email, :password

validates_confirmation_of :password, :if => :password_changed? #require confirmation only if it has changed validates_confirmation_of :email, :if => :email_changed?

validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "email address didn't validate, example john@example.com"

attr_protected :id, :salt

attr_accessor :password, :password_confirmation, :email_confirmation


Yup, that's basically what I did when I gutted everything to use AuthenicatedSystem (acts_as_authenicated)

Thanks ;D