Module: ZeroDowntime::Deprecatable::ClassMethods

Defined in:
lib/zero_downtime/deprecatable.rb

Instance Method Summary collapse

Instance Method Details

#deprecate_column(column_name, options = {}) ⇒ Object

deprecate a given column so it will be ignore by activerecord we can remove it once the deprecation is deployed



48
49
50
51
52
53
54
55
# File 'lib/zero_downtime/deprecatable.rb', line 48

def deprecate_column(column_name, options={})
  deprecate_column_reader(column_name, options)
  deprecate_column_writer(column_name)
  override_attribute_methods

  self.deprecated_columns ||= []
  deprecated_columns << column_name.to_s
end