Sha256: 826d6868418e414cab0db1ac40cde293ce79ea2954012c75e8d47eba14259295

Contents?: true

Size: 387 Bytes

Versions: 5

Compression:

Stored size: 387 Bytes

Contents

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

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

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rails_datamapper-1.0.2 generators/dm_model/templates/model.rb
rails_datamapper-1.0.1 generators/dm_model/templates/model.rb
tpitale-rails_datamapper-0.10.3.1 generators/dm_model/templates/model.rb
tpitale-rails_datamapper-0.10.3 generators/dm_model/templates/model.rb
rails_datamapper-0.10.2 generators/dm_model/templates/model.rb