Is it possible to keep things DRY and put this into one validation line?
validates_presence_of :login
validates_uniqueness_of :login
Is it possible to keep things DRY and put this into one validation line?
validates_presence_of :login
validates_uniqueness_of :login
In Rails 3 (which is not released yet, but please do try out the beta) you can!
validates :login, :presence => true, :uniqueness => true