Module: Lhm
- Defined in:
- lib/lhm.rb,
lib/lhm/adapter.rb,
lib/lhm/column_with_sql.rb,
lib/lhm/column_with_type.rb
Overview
Defines the same global namespace as LHM’s gem does to mimic its API while providing a different behaviour. We delegate all LHM’s methods to ActiveRecord so that you don’t need to modify your old LHM migrations
Defined Under Namespace
Classes: Adapter, ColumnWithSql, ColumnWithType
Class Method Summary collapse
-
.change_table(table_name, _options = {}, &block) {|Adapter.new(@migration, table_name)| ... } ⇒ Object
Yields an adapter instance so that Lhm migration Dsl methods get delegated to ActiveRecord::Migration ones instead.
-
.migration=(migration) ⇒ Object
Sets the migration to apply the adapter to.
Class Method Details
.change_table(table_name, _options = {}, &block) {|Adapter.new(@migration, table_name)| ... } ⇒ Object
Yields an adapter instance so that Lhm migration Dsl methods get delegated to ActiveRecord::Migration ones instead
14 15 16 |
# File 'lib/lhm.rb', line 14 def self.change_table(table_name, = {}, &block) yield Adapter.new(@migration, table_name) end |
.migration=(migration) ⇒ Object
Sets the migration to apply the adapter to
21 22 23 |
# File 'lib/lhm.rb', line 21 def self.migration=(migration) @migration = migration end |