Since some columns will appear or disappear at any moment, you want to make those columns invisible to AR for a while. Otherwise you could have some processes knowing about the columns and others who don’t.
这是一些示例代码:
class User < ApplicationRecord
self.ignored_columns = %w(employee_email)
end
Since some columns will appear or disappear at any moment, you want to make those columns invisible to AR for a while. Otherwise you could have some processes knowing about the columns and others who don’t.
这是一些示例代码:
class User < ApplicationRecord
self.ignored_columns = %w(employee_email)
end