Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def before_create
- self.hashed_password = EmployerUser.hash_password(self.password)
- user = (User.create!({:email => self.email, :usertype => "Employer"}) rescue false)
- self.errors.add_to_base("bad news, didnt work") unless user
- # or the below, not sure
- # self.errors.add_to_base("bad news, didnt work") and return false unless user
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement