Module: DBNazi::Table
- Defined in:
- lib/db_nazi/table.rb
Class Method Summary collapse
Instance Method Summary collapse
- #change_with_db_nazi(column_name, type, options = {}) ⇒ Object
- #column_with_db_nazi(column_name, type, options = {}) ⇒ Object
- #index_with_db_nazi(column_name, options = {}) ⇒ Object
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/db_nazi/table.rb', line 3 def self.included(base) base.class_eval do alias_method_chain :column, :db_nazi alias_method_chain :index, :db_nazi alias_method_chain :change, :db_nazi end end |
Instance Method Details
#change_with_db_nazi(column_name, type, options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/db_nazi/table.rb', line 21 def change_with_db_nazi(column_name, type, = {}) DBNazi.check_column(type, ) change_without_db_nazi(column_name, type, ) end |
#column_with_db_nazi(column_name, type, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/db_nazi/table.rb', line 11 def column_with_db_nazi(column_name, type, = {}) DBNazi.check_column(type, ) column_without_db_nazi(column_name, type, ) end |
#index_with_db_nazi(column_name, options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/db_nazi/table.rb', line 16 def index_with_db_nazi(column_name, = {}) DBNazi.check_index() index_without_db_nazi(column_name, ) end |