tchandy/octopus — Issue #57: increment_counter problem
Author: famicity
Created: 2011-11-18 11:45:51+00:00
State: open

Hello,

I'm using rails 3.0.10 with octopus. I have an error like that:

ActiveRecord::StatementInvalid: Mysql2::Error: UPDATE command denied to user 'reader'@'server' for table 'articles': UPDATE `articles` SET `view_count` = COALESCE(`view_count`, 0) + 1 WHERE `articles`.`id` = 233322

reader@server is the user for read operations, not writing

I don't have any other errors for writing operations in my website. This is the only one and it happens on this line of code:
Article.increment_counter(:view_count, @article.id)

Is there a bug here?
Thanks

Jerome