I ran into small problem here, but couldn't find the solution
I have this model:
create_table :users do |t|
t.column "username", :string
t.column "email", :string
t.column "password", :string
I want to force User.username to be in lowercase in every save/update.
So, if I fill 'MeMbeR', no error raised, but it's saved as 'member' in
the table. I tried this way:
@username = user.downcase
But it results in username being NULL in the table.
Any advice would be very helpful. Thanks.