Module: ToyAttributes::Observer

Defined in:
lib/toy-attributes/observer.rb

Class Method Summary collapse

Class Method Details

.watch!(column_name, column_type, model, options = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/toy-attributes/observer.rb', line 3

def self.watch! column_name, column_type, model, options={}
  assert_existence_of_table(model)
  assert_existence_of_column(column_name, column_type, model, options)
  model.reset_column_information
  model.attr_accessible column_name
end