Sha256: 9f77ab943c6865577fe6e0b02d16cf1591a9e4af42aecba9e9c792c64d27e211

Contents?: true

Size: 262 Bytes

Versions: 13

Compression:

Stored size: 262 Bytes

Contents

class <%= model.to_s %>
  include DataMapper::Resource
  
  property :id, Serial

<% model.fields.each do |k, v| %>
  property :<%= "#{k}, #{Merb.db_value_name(v)}" %>
<% end %>

<% model.associations.each do |k, v| %>
  <%= "#{v[:type]} :#{k}" %>
<% end %>
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mattknox-goaloc-0.2.10 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.2.11 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.2.6 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.2.7 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.2.8 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.2.9 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.3.0 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.0 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.1 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.2 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.4 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.5 lib/goaloc/generators/merb/model.rb.erb
mattknox-goaloc-0.4.7 lib/goaloc/generators/merb/model.erb