Sha256: df3929f69b70ea46eedcbae02dc5b31d67dca679fd2271f405fb85e4541b4925

Contents?: true

Size: 390 Bytes

Versions: 2

Compression:

Stored size: 390 Bytes

Contents

class <%= class_name %>
  include DataMapper::Resource

  property :id, Serial
<% Array(attributes).each do |attribute| -%>
  property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :nullable => false
<% end -%>
<% unless options[:skip_timestamps] -%>
  property :created_at, DateTime, :nullable => false
  property :updated_at, DateTime, :nullable => false
<% end -%>

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_datamapper-0.10.1 generators/dm_model/templates/model.rb
rails_datamapper-0.10.0 generators/dm_model/templates/model.rb