Sha256: ecca2221ef3c4f02e8521e736c3961996796023acd731edc3c1a78537eaefe75

Contents?: true

Size: 485 Bytes

Versions: 7

Compression:

Stored size: 485 Bytes

Contents

  fields do
<% for attribute in field_attributes -%>
    <%= "%-#{max_attribute_length}s" % attribute.name %> :<%= attribute.type %>
<% end -%>
<% if options[:timestamps] -%>
    timestamps
<% end -%>
  end
  attr_accessible <%= accessible_attributes.map {|a| ":#{a.name}"}.join ", " %>

<% 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

7 entries across 7 versions & 1 rubygems

Version Path
hobo_fields-2.0.0.pre7 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre6 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre5 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre4 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre1 lib/generators/hobo/model/templates/model_injection.rb.erb