Rails patch and counter update