Here is the problem There is a gallery model and image model gallery has many images gallery has images_count.
When I change image from one gallery to another i have to update the counter cache(It does not happen automatically on doing gallery2.images << image). So i do gallery1.images_count -= 1 gallery2.images_count += 1 gallery1.save gallery2.save
but this still does not update the count of the images
when i see the log files, the update queries are fired, but they update only the updated_at column and not the images_count column. The same thing works when done through console. Can any one explain why this is happening?
Regards, Pankaj