<turbo-stream action="replace" target="content"><template><turbo-frame id="content"><h5 class="strong cell">Club or Course</h5><div class="grid-x grid-padding-x"><div class="small-6 cell"><p class="slim">Club is the top level resource. Every other resource belongs to the Club either directly or indirectly. Currently CRUD methods are restricted to a SuperUser.</p><pre><code>class Club < ApplicationRecord
  has_many :groups, :dependent => :destroy
  has_many :players, through: :groups
end</code></pre><div class="strong">Purpose</div><ul class="classic"><li>To separate Groups, Players, etc from other Clubs</li><li>To provide par_in, par_out to print a score card.</li></ul><p class="slim">If a Club has multiple courses, I've been through that and it is not easy. Maxwell AFB used to have two courses and players played from multiple tee. GolfGaggle managed Quotas by Course and Tee.  Lets just say it was difficult to display all the options. Computing the Quotas was not difficult, just displaying information. My suggestion would be to create Groups for each course. Players then can be duplicated from one group to another.</p></div><div class="small-6 cell"><div class="strong">Data Elements</div><dl class="indent-dd"><dt class="strong">long_name</dt><dd>The formal name of the Club or Course, e.g. "Twin Bridges Golf Course"</dd><dt class="strong">name</dt><dd>A short name that is unique to PtGolf. A string key to a Club. (e.g. tb = "Twin Bridges Golf Course")</dd><dt>city</dt><dt>state</dt><dt>phone</dt><dd>Phone number of club.</dd><dt>par_in</dt><dd>A string representing the par score for each hole on the front nine. e.g., "443455434"</dd><dt>par_out</dt><dd>A string representing the par score for each hole on the back nine. e.g., "443455434"</dd><dd>par_in and par_out are used with printing a score-card for a team.</dd></dl></div></div></turbo-frame></template></turbo-stream>