Class: ActiveRecord::ConnectionAdapters::TableDefinition
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::TableDefinition
- Defined in:
- lib/generators/templates/gem_initializer.rb
Instance Method Summary collapse
Instance Method Details
#from_active_record_belongs_to(*args) ⇒ Object
7 8 9 10 11 |
# File 'lib/generators/templates/gem_initializer.rb', line 7 def from_active_record_belongs_to (*args) = args. column_names = args column_names.each { |name| column("#{name}_id".to_sym, 'string', ) } end |