I am not really sure about all your specifications when one union is one or many, but I think that something like this might happen: In this setup, there are several partitions in each match. Each participant is connected to the player who is participating and an inscription for that player. Also the match can be used as such: Controller View in I hope it was at least something that is going for you. Tell me if you are looking for something else.
Tell me what I want to do:
is a matching model about which information should be Which players and the tribes were involved in the split of the domestic players and clans and away players and tribes.
It is very easy, but there is another model: Samnner Each player has separate summons in each match and I need to do something like this: Match.find (1) .players_home. Find (1) .summoner.name to remove the summoner who played player 1 at home.
The point is: In each match, each player can play with a different summoner.
I hope I describe it clearly
Regards.
is square match_mela: partnership is_maya: player, = via & gt; : Participation, end-of-class partnership, relates to: To match: The player believes: "Conference #" is a team feature to store either "home" or "away" area: home, where ( : Team = & gt; "home") Region: away, where (: team => "away") related to end-class player_to: clan is_maya: participation is_main: matches, = through => : Partition end of the partnership with Samar Near Money: Partition End
@ match = match.find (1) @home_participations = @ match.participations .home @away_participations = @ Match.participations.away
& lt; H1 & gt; Home player & lt; / H1> & Lt;% @ home_participations.each do | P | & Gt%; & Lt; P & gt; Player: & lt;% = p.player.name% & gt;; Written by: & lt;% = p.summoner.name% & gt; & Lt; / P & gt; & Lt;% end% & gt;
Comments
Post a Comment