I have a User model that has a :credits attribute. I want a simple button that will add 5 to the user\'s credits, through a route called \"add\" so that /users/3/add would ad
I think you should use the method update_counters in this case. Use it like this in your controller action:
def add User.update_counters params[:id], :credits => 5 redirect_to root_path end