Sha256: 2619a249694595e422532df309e6f98f59ebd405835dd959d729a38b9c024e4f
Contents?: true
Size: 515 Bytes
Versions: 17
Compression:
Stored size: 515 Bytes
Contents
class <%= class_name %> < <%= parent_class_name.classify %> <% attributes.select {|attr| attr.reference? }.each do |attribute| -%> belongs_to :<%= attribute.name %> <% end -%> structure do <% unless attributes.blank? max_field_length = attributes.collect { |attribute| attribute.name.to_s}.max { |name| name.length }.length attributes.reject { |attr| attr.reference? }.each do |attribute| -%> <%= attribute.name.to_s.ljust(max_field_length) %> :<%= attribute.type %> <% end end -%> end end
Version data entries
17 entries across 17 versions & 1 rubygems