← #TIL

ActiveRecord caches attributes which causes problems when removing columns

·1 phút đọc

Be sure to ignore the column Add to models/model.rb

def self.columns super.reject { |c| ["<column_name>"].include?(c.name) } end

Ref: https://github.com/ankane/strong_migrations#removing-a-column

Note này hắn lấy từ GitHub issue qua.