For some weird reason the new_messages_count
column doesn't update to zero inside the database. I'm doing this from a controller:
@conversation = Conversation.find(params[:id])
@conversation.update(new_messages_count: 0)
The column is set like this: t.integer :new_messages_count, default: 0, null: false
If I do the above inside the rails console then the column gets updated to zero. I have no idea why this is happening, but can someone tell me how to update a column to zero from a controller?