rafactor the bug fix of ActiveRecord JSON arrays as columns not working