1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-08 07:22:38 +00:00

Converted class tournamentmatchgen into the GeneratesLoserNames module.

Here is another way to handle functionality that you may not want bloating your ActiveRecord class, yet belongs _on_ the model.
In this case, I feel there is an abstraction we are still sorely missing.
This commit is contained in:
RJ Osborne
2015-05-27 23:29:51 -04:00
parent 25c92a125d
commit 9b2c2dde60
4 changed files with 61 additions and 59 deletions

View File

@@ -1,4 +1,7 @@
class Tournament < ActiveRecord::Base
include GeneratesLoserNames
has_many :schools, dependent: :destroy
has_many :weights, dependent: :destroy
has_many :mats, dependent: :destroy