Skip to content
Browse files

Edit node functionality

  • Loading branch information...
1 parent 9a7a744 commit 4c422b3b5fc627a4282d1c7b2c008a4b585f76f7 @KentonWhite committed Jun 21, 2010
Showing with 10 additions and 15 deletions.
  1. +1 −1 Gemfile
  2. +2 −5 app/views/mazes/edit.html.erb
  3. +4 −1 app/views/nodes/_show_links.html.erb
  4. +2 −8 app/views/nodes/edit.html.erb
  5. +1 −0 mate
View
2 Gemfile
@@ -29,4 +29,4 @@ gem 'mocha'
gem 'mongrel'
-gem "nifty-generators"
+gem "nifty-generators"
View
7 app/views/mazes/edit.html.erb
@@ -1,9 +1,6 @@
<% title "Edit Maze" %>
-<p>
- <strong>Title:</strong>
- <p><%= @maze.title %></p>
-</p>
+<%= render 'form' %>
<p>
<strong>Nodes:</strong>
@@ -19,5 +16,5 @@
<p>
<%= link_to "Create Node", new_maze_node_path(@maze) %> |
- <%= link_to "View All", mazes_path %>
+ <%= link_to "Back", mazes_path %>
</p>
View
5 app/views/nodes/_show_links.html.erb
@@ -1,4 +1,7 @@
<strong>Links:</strong>
<% @links.each do |link| %>
- <p><%= link_to link.text, maze_node_path(@maze, link.to_node_id) %></p>
+ <p>
+ <%= link_to link.text, maze_node_path(@maze, link.to_node_id) %>
+ <%= link_to 'Edit', edit_maze_node_link_path(@maze, @node, link) %>
+ </p>
<% end %>
View
10 app/views/nodes/edit.html.erb
@@ -1,12 +1,6 @@
<% title "Edit Node" %>
-<p>
- <strong>Title:</strong>
- <%= @node.title %>
-</p>
-<p>
- <strong>Content:</strong>
- <%= @node.content %>
-</p>
+
+<%= render 'form' %>
<p>
<%= render :partial => 'show_links' %>
View
1 mate
@@ -0,0 +1 @@
+/Users/kwhite/.rvm/gems/ruby-1.9.2-head/gems/ZenTest-4.3.2/lib/zentest.rb

0 comments on commit 4c422b3

Please sign in to comment.
Something went wrong with that request. Please try again.