generators/dm_model/templates/model.rb in rails_datamapper-0.10.1 vs generators/dm_model/templates/model.rb in rails_datamapper-0.10.2
- old
+ new
@@ -1,13 +1,13 @@
class <%= class_name %>
include DataMapper::Resource
property :id, Serial
<% Array(attributes).each do |attribute| -%>
- property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :nullable => false
+ property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :required => true
<% end -%>
<% unless options[:skip_timestamps] -%>
- property :created_at, DateTime, :nullable => false
- property :updated_at, DateTime, :nullable => false
+ property :created_at, DateTime, :required => true
+ property :updated_at, DateTime, :required => true
<% end -%>
end