Update Query - Adding one to a int value

Active Record provides you with
Item.increment_counter :count, 1234
which performs ‘update items set count=count+1 where id=1234’

You may wrap that in an instance method such as

class Item < AR::Base
def increment_count!
self.class.increment_count :count, id
end
end

Then call @item.increment_count! as you please.

jeremy