StripAttributes是一个消除空白的ActiveRecord扩展,如果这个属性是空白,则返回nil。 用法: gem 'strip_attributes' strip_attributes only: %i[ remark ]