first evening of playing with rails, so please forgive me if I ask
I created a User model and tried to use ActiveRecord callbacks to
convert the password to sha1 just before saving it. For some reason
postgresql gives me a error because the given password is null. To
test even further I tried to change :login too, same error happens,
:login is empty too.
I am sure I am missing something really obvious, but I don’t see it yet.
Here is the model code:
class User < ActiveRecord::Base
attr_accessor :password, :login
attr_accessible :password, :name, :login, :email
validates_presence_of :name, :login, :password, :email
Thanks in advance,
OpenBSD needs your help improving the softwareworld, please donate:
Yes big code using companies, that includes you!