Sha256: 8758c8d26f0b5fafa98fd368b4dcdd19989a1a11de888aa44a9ca9deabfa2a51

Contents?: true

Size: 445 Bytes

Versions: 37

Compression:

Stored size: 445 Bytes

Contents

class <%= class_name %> < PushType::Node

  # By default a node can have children of any other node type.
  # Optionally pass a list of acceptable node types or prevent
  # any descendents by passing false.
  has_child_nodes :all

  # Model the content by adding custom fields to the node.
<% if attributes.each do |att| -%>
  <%= attribute_as_field(att) %>
<% end.empty? -%>
  # field :body, :text, validates: { presence: true }
<% end -%>

end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
push_type_core-0.12.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.12.0 lib/generators/push_type/node/templates/node.rb
push_type_core-0.12.0.beta.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.11.2 lib/generators/push_type/node/templates/node.rb
push_type_core-0.11.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.11.0.beta.2 lib/generators/push_type/node/templates/node.rb
push_type_core-0.11.0.beta.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.4 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.3 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.2 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.0 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.0.beta.5 lib/generators/push_type/node/templates/node.rb
push_type_core-0.10.0.beta.3 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.5 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.3 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.2 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.1 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.0 lib/generators/push_type/node/templates/node.rb
push_type_core-0.9.0.beta.4 lib/generators/push_type/node/templates/node.rb