Sha256: b1334af48bf647429cc6e4cc4957513698db3e4676d8821a79c324eb4bfb1934

Contents?: true

Size: 480 Bytes

Versions: 19

Compression:

Stored size: 480 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}"}.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

19 entries across 19 versions & 1 rubygems

Version Path
hobo_fields-2.2.6 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.5 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.4 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.2.0 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.0 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.0.pre4 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.0.pre3 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.0.pre2 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.1.0.pre1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.1 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre10 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre9 lib/generators/hobo/model/templates/model_injection.rb.erb
hobo_fields-2.0.0.pre8 lib/generators/hobo/model/templates/model_injection.rb.erb