Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9bec2d5993
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (10 sloc) 0.513 kB
class <%= class_name %>
include DataMapper::Resource
property :id, Serial
<% Array(attributes).each do |attribute| -%>
property :<%= attribute.name %>, <%= attribute.type.to_s.capitalize %>, :required => true<% if attribute.type == :string or attribute.type == :text or attribute.type == :slug -%>, :format => /^[^<'&">]*$/<% if attribute.type == :string or attribute.type == :slug %>, :length => 255<% end -%><% end %>
<% end -%>
<% unless options[:skip_timestamps] -%>
timestamps :at
<% end -%>
end
Jump to Line
Something went wrong with that request. Please try again.