Sha256: 5ced050b134e4c65e8339c92a78ec57e4da6603f0e514e0c4db8dfba77296095
Contents?: true
Size: 477 Bytes
Versions: 10
Compression:
Stored size: 477 Bytes
Contents
// for more details see: http://emberjs.com/guides/models/defining-models/ import DS from 'ember-data'; export default DS.Model.extend({ <% attributes.each_with_index do |attribute, idx| -%> <%= attribute[:name].camelize(:lower) %>: <%= if %w(references belongs_to).member?(attribute[:type]) "DS.belongsTo('%s')" % attribute[:name].camelize(:lower) else "DS.attr('%s')" % attribute[:type] end %><% if (idx < attributes.length-1) %>,<% end %> <% end -%> });
Version data entries
10 entries across 10 versions & 2 rubygems