Sha256: 5cac3b84e4c5d143c1009d4f7467e68bc3e9f323c8424c293cf33b6aaf7b8191

Contents?: true

Size: 405 Bytes

Versions: 36

Compression:

Stored size: 405 Bytes

Contents

  fields do
<% for attribute in field_attributes -%>
    <%= "%-#{max_attribute_length}s" % attribute.name %> :<%= attribute.type %>
<% 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? -%>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hobo_fields-1.3.3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre8 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre7 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre6 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre5 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre4 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.4.0.pre2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.RC4 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.RC3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.RC2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.RC1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.RC lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.pre31 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.pre29 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.pre28 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-1.3.0.pre27 lib/generators/hobo/model/templates/model_injection.rb.erb