Module: StrongSchema::SchemaExtension

Defined in:
lib/strong_schema/schema_extension.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

: (Symbol, *untyped) -> untyped



6
7
8
9
10
11
12
13
14
# File 'lib/strong_schema/schema_extension.rb', line 6

def method_missing(method, *args)
  return super if method == :change_table || StrongSchema.should_ignore?(method, args)

  catch(:safe) do
    StrongMigrations::Checker.new(self).tap { |c| c.direction = :up }.perform(method, *args) do
      super
    end
  end
end