summaryrefslogtreecommitdiffhomepage
path: root/app/views/nodes/new.html.erb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2020-12-02 19:26:28 -0500
committerrealtradam <[email protected]>2020-12-02 19:26:28 -0500
commitd13b636bd654244f894943c2968a7386e8379605 (patch)
tree410809bae61eac943e1af19ecfd2c2f31143c796 /app/views/nodes/new.html.erb
downloadrails-tree-style-activerecord-d13b636bd654244f894943c2968a7386e8379605.tar.gz
rails-tree-style-activerecord-d13b636bd654244f894943c2968a7386e8379605.zip
initial
Diffstat (limited to 'app/views/nodes/new.html.erb')
-rw-r--r--app/views/nodes/new.html.erb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
new file mode 100644
index 0000000..ee0adb6
--- /dev/null
+++ b/app/views/nodes/new.html.erb
@@ -0,0 +1,18 @@
+<h1>new wiki page</h1>
+<%= form_with scope: :node, url: nodes_path, local: true do |form| %>
+ <p>
+ <%= form.label :title %><br>
+ <%= form.text_field :title %>
+ </p>
+
+ <p>
+ <%= form.label :content %><br>
+ <%= form.text_area :content %>
+ </p>
+
+ <%= form.collection_select :parent, @nodes, :id, :title, include_blank: true %>
+
+ <p>
+ <%= form.submit %>
+ </p>
+<% end %>