Sha256: f4f43a8d3279f034d1698e51ce465229358c7be89b7500c3084a2a1eb3e4e677

Contents?: true

Size: 402 Bytes

Versions: 15

Compression:

Stored size: 402 Bytes

Contents

<%- module_namespacing do -%>
<%- if parent_class_name.present? -%>
class <%= class_name %> < <%= parent_class_name.classify %>
<%- else -%>
class <%= class_name %>
  include MongoMapper::Document
<%- end -%>

<%- attributes.each do |attribute| -%>
  key :<%= attribute.name %>, <%= attribute.type.to_s.camelcase %>
<% end -%>
<%- if options[:timestamps] -%>
  timestamps!
<%- end -%>

end
<%- end -%>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mongo_mapper-0.17.0 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.16.0 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.6 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.5 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.4 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.3 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.2 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.1 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.15.0 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.14.0 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.14.0.rc1 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.13.1 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.13.0 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.13.0.beta2 lib/rails/generators/mongo_mapper/model/templates/model.rb
mongo_mapper-0.13.0.beta1 lib/rails/generators/mongo_mapper/model/templates/model.rb