I have a User model, which has an email and a password field. For security, these may not be equal to each other. How can I define this in my model?
all you need is to create validation rule in your model for example
class User < ActiveRecord::Base def validate_on_create if email == password errors.add("password", "email and password can't be the same") end end end