This looks suspicious to me - you say that this is a method in your Product model, but then the method updates an entirely different product instance (the one you pass in, not the one you call the method on).
If this was something like:
class Product < ActiveRecord::Base
def update_stock
self.stock -= 1
save
end
end
Then it would be much more appropriate. (update_stock
doesn't seem like the best name for the method, either, and skipping the validations likely isn't a good idea.)