Sha256: ae83e5c0c68fb7bebe88fbb4d57988c3dfd2d3ff07d2491620becd9019e62ed5

Contents?: true

Size: 395 Bytes

Versions: 8

Compression:

Stored size: 395 Bytes

Contents

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ember-appkit-rails-0.5.0 lib/generators/templates/model.es6
ember-appkit-rails-0.4.0 lib/generators/templates/model.js.es6
ember-appkit-rails-0.3.2 lib/generators/templates/model.js.es6
ember-appkit-rails-0.3.1 lib/generators/templates/model.js.es6
ember-appkit-rails-0.3.0 lib/generators/templates/model.js.es6
ember-appkit-rails-0.2.2 lib/generators/templates/model.js.es6
ember-appkit-rails-0.2.1 lib/generators/templates/model.js.es6
ember-appkit-rails-0.2.0 lib/generators/templates/model.js.es6