fields do <% for attribute in field_attributes -%> <%= "%-#{max_attribute_length}s" % attribute.name %> :<%= attribute.type %><%= case attribute.type.to_s when 'string' ', limit: 255' else '' end %> <% end -%> <% if options[:timestamps] -%> timestamps <% end -%> end <% for bt in bts -%> belongs_to :<%= bt %> <% end -%> <%= "\n" unless bts.empty? -%> <% for hm in hms -%> has_many :<%= hm %>, dependent: :destroy <% end -%> <%= "\n" unless hms.empty? -%>