Sha256: 30f7d17ceb86be8f217315b32cba0275a9d655327e8c63c3b3bbce178478dedb

Contents?: true

Size: 495 Bytes

Versions: 2

Compression:

Stored size: 495 Bytes

Contents

#!/usr/bin/env ruby
#
# A one file test to show ...
require 'rubygems'
require 'dm-core'


# setup the logger
DataMapper::Logger.new(STDOUT, :debug)

# connect to the DB
DataMapper.setup(:default, 'sqlite3::memory:')

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

  # properties
  property :id, Serial
<% properties.each do |name, type| -%>
  property :<%= name %>, <%= type %>
<% end %>
end

DataMapper.auto_migrate!

# put the code here!


__END__

# put a copy of the output here!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dm-gen-0.4.2 lib/dm-gen/templates/one_file.rb
dm-gen-0.4.1 lib/dm-gen/templates/one_file.rb