you should overwrite the attribute writer:
class User < ActiveRecord::Base
def username=(val)
write_attribute(:username, val.downcase)
end
end
you should overwrite the attribute writer:
class User < ActiveRecord::Base
def username=(val)
write_attribute(:username, val.downcase)
end
end