Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Show links in nodes

  • Loading branch information...
commit 896c3b707a8f56e8aee1e76b9ce693fa935549ad 1 parent f6a5e22
Kenton White authored
3  app/controllers/nodes_controller.rb
@@ -2,13 +2,14 @@ class NodesController < ApplicationController
2 2
3 3 before_filter :login_required
4 4 before_filter :get_maze
5   -
  5 +
6 6 def index
7 7 @nodes = @maze.nodes.all
8 8 end
9 9
10 10 def show
11 11 @node = @maze.nodes.find(params[:id])
  12 + @links = @node.links.all
12 13 end
13 14
14 15 def new
4 app/views/nodes/_show_links.html.erb
... ... @@ -0,0 +1,4 @@
3  app/views/nodes/show.html.erb
@@ -7,6 +7,9 @@
7 7 <p>
8 8 <strong>Content:</strong>
9 9 <%= @node.content %>
  10 +</p>
  11 +<p>
  12 +<%= render :partial => 'show_links' %>
10 13 </p>
11 14
12 15 <p>

0 comments on commit 896c3b7

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