Sha256: 135fb6abca36e5cc484d2446d2e36adc24ee34e0549a9fda097a38a41f223b1c

Contents?: true

Size: 660 Bytes

Versions: 42

Compression:

Stored size: 660 Bytes

Contents

class <%= class_name %> <%= parent? ? "#{options[:parent].classify}" : "" %>
  include ActiveGraph::Node
<% attributes.reject(&:reference?).each do |attribute| -%>
  property :<%= attribute.name %><%= ", type: #{attribute.type_class}" unless attribute.type_class == 'any' %><%= "\n  " + index_fragment if index_fragment = index_fragment(attribute.name) %>
<% end -%>

<% attributes.select(&:reference?).each do |attribute| -%>
  has_one :in_or_out_or_both, :<%= attribute.name %>, type: :FILL_IN_RELATIONSHIP_TYPE_HERE
<% end -%>

<%= has_many_statements if has_many? -%>
<%= has_one_statements if has_one? -%>

<%= timestamp_statements if timestamps? -%>
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
activegraph-12.0.0.beta.4 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.5.0.beta.3 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-12.0.0.beta.3 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-12.0.0.beta.2 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.5.0.beta.2 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-12.0.0.beta.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.5.0.beta.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.5.0.alpha.1 lib/active_graph/generators/model/templates/model.erb
activegraph-11.4.0 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.3.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.3.0 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.2.0 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0.beta.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0.alpha.4 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0.alpha.3 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0.alpha.2 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.1.0.alpha.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-10.2.0.beta.1 lib/rails/generators/active_graph/model/templates/model.erb
activegraph-11.0.2-java lib/rails/generators/active_graph/model/templates/model.erb