On 22 August 2012 19:37, Jason Walsh <[email protected]> wrote: > Hi > > Just interested in anybody's opinion on the following: > > I have one model class called Diagram, that contains a number of Node > classes (ie 1-many relationship). One of the Node classes must be the > start node.
Some questions: Are the other nodes in a sequence or is it just the start node that is special (in other words could you link from node to node)? I am not saying you should do that, just asking the question. Is the start node considered by the Diagram to be different from the others, or is just that it happens to be the start one (whatever that may mean)? Is the node intrinsically a start node, in other words is there something special about it, or is it only from the point of view of the Diagram that it is node of this type. Or to put it another way are there nodes of two types, 'start' and 'ordinary'? Colin > > Which would be better: > > 1. Attribute in Diagram class called StartNode containing id of the > start Node. > > 2. Boolean attribute in Node class called StartNode? and set to true if > its the start node. > > Would be interested in knowing the 'Rails' way of doing this :) > > Cheers > > Jason > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

