Sha256: c2a7740831baa3d605731bd18f7fca0d2ad0dff317e379f6f1cde0d0d3c373c8

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

<%= 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.%s')" % [application_name.camelize, attribute[:name].camelize]
  else
    "DS.attr('%s')" % attribute[:type]
  end
  %><% if (idx < attributes.length-1) %>,<% end %>
<% end -%>
});

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
ember-rails-0.12.0 lib/generators/templates/model.js
ember-rails-lite-0.11.1 lib/generators/templates/model.js