Sorry about the subject line, but I could not come up with a better description...

I have the following models (for a sports league application):

   * Play
         o belongs to Player
         o belongs to Engagement
         o has score, field1, field2, etc.
   * Player
         o has many match_record, class name of Play
   * Engagement
         o has many line_up, class name of Play

I need to show following information in two tables:

  1. engagement, score, field1, field2, etc.
  2. player, score, field1, field2, etc.

Where the first one is for the match_record on the player show page and the second one is for the line_up on the engagements page.

As you can see, its really the same information.  The only differences are:

  1. which collection to use
  2. which first column to use

Is it possible to define a tag that nicely handles both tables?

Regards,
Henry

ps.  Here is the relevant code I am using for both tables:

  1. On the players show page:
         * <table:match_record fields="engagement, collectable,
           collected, owing" />
  2. On the engagements show page:
         * <table:line_up fields="player, collectable, collected, owing" />





--
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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 this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to