After having been given som references concerining this hip new REST
thing (thanks Mathieu) it seems that REST, especially the nested
resources bit, is for me. I am trying to develop a membership
administration application specifi for my sport, so I really like the
idea of being able to "enter" a club and doing everything in the
context of that club in an explicit way (i.e. not setting a session
variable and all that).
This means, of course, that a member is a member of a club. This is
all very good for most situations, however, I would like to develop a
statistics module for the entire organization (i.e. all clubs). Now,
since members is only used within a club, it seems that this would
mean iterating through al clubs, joining the membership lists,
resorting them and THEN begin to dispay statistics. Seems very
The suggested solution I can come up with is to have a new model
organisation to which all clubs belong and has a has_many -
relationship with members, through clubs. Then, have a nested resource
where members is in organisation (whith an id which is always 1).
Would this work? Are there potential conflicts involved in having
multiple nested routes with the same resource?
I'm not really a strong enough Rails developer for this so I
appreciate all the help I can get !