Module: Hypershield::Migration

Defined in:
lib/hypershield/migration.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/hypershield/migration.rb', line 3

def method_missing(method, *args)
  if [
    :change_column, :change_table, :drop_join_table, :drop_table,
    :remove_belongs_to, :remove_column, :remove_columns,
    :remove_reference, :remove_timestamps, :rename_column, :rename_table
  ].include?(method)
    Hypershield.drop_view(args[0])
  end

  super
end