Sha256: 0b4fc0f2cc8c157d98988625b4513fd24b9a518d8a2655e2d8ab7a7fb7e4684e
Contents?: true
Size: 485 Bytes
Versions: 29
Compression:
Stored size: 485 Bytes
Contents
// for more details see: http://emberjs.com/guides/models/defining-models/ <%= application_name.camelize %>.<%= class_name %> = 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
29 entries across 29 versions & 4 rubygems