When a user is created, which includes a ‘screen_name’ attribute, I would like to set the value of a user attribute called: ‘username’ to the value of screen_name, but downcase, by default.
I’m using active record and rails, what would be the best solution for this?
Thanks
You could add a
before_createfilter in yourapp/models/user.rbfile: