Permalink
Browse files

viewhints-children

# Specifying view relationships

If we tell Hobo which has\_many relationships are significant, Hobo adjusts to display the list of children on its parent's page.

We added five has\_many relationships, but only two of them are significant, for now.  We specify these in the model file for the parent.

SHOW_PATCH
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent 2c688c0 commit 054dea39d40d0d82d804687c575f5b60ff6ea1e1
Showing with 4 additions and 0 deletions.
  1. +2 −0 app/models/project.rb
  2. +2 −0 app/models/story.rb
View
@@ -11,6 +11,8 @@ class Project < ActiveRecord::Base
has_many :stories, :dependent => :destroy, :inverse_of => :project
children :stories
# --- Permissions --- #
def create_permitted?
View
@@ -15,6 +15,8 @@ class Story < ActiveRecord::Base
has_many :tasks, :dependent => :destroy, :inverse_of => :story
children :tasks
# --- Permissions --- #
def create_permitted?

0 comments on commit 054dea3

Please sign in to comment.