-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
93 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
|
||
## NB: just use namespace SportDb::Models (not SportDb::Models::Play) | ||
## NB: just use namespace SportDb::Model (not SportDb::Model::Play) | ||
|
||
module SportDb::Models | ||
module SportDb | ||
module Model | ||
|
||
|
||
class BonusPoint < ActiveRecord::Base | ||
|
||
belongs_to :user | ||
belongs_to :pool | ||
belongs_to :round, :class_name => 'BonusRound', :foreign_key => 'round_id' | ||
belongs_to :round, class_name: 'BonusRound', foreign_key: 'round_id' | ||
|
||
end # class BonusPoint | ||
|
||
end # module Model | ||
end # module SportDb | ||
|
||
end # module SportDb::Models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
|
||
## NB: just use namespace SportDb::Models (not SportDb::Models::Play) | ||
## NB: just use namespace SportDb::Model (not SportDb::Model::Play) | ||
|
||
module SportDb::Models | ||
module SportDb | ||
module Model | ||
|
||
|
||
class BonusQuestion < ActiveRecord::Base | ||
|
||
self.table_name = 'bonus_questions' | ||
|
||
has_many :tips, :class_name => 'BonusTip', :foreign_key => 'question_id' | ||
has_many :tips, class_name: 'BonusTip', foreign_key: 'question_id' | ||
|
||
end # class BonusQuestion | ||
|
||
end # module Model | ||
end # module SportDb | ||
|
||
end # module SportDb::Models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
|
||
## NB: just use namespace SportDb::Models (not SportDb::Models::Play) | ||
## NB: just use namespace SportDb::Model (not SportDb::Model::Play) | ||
|
||
module SportDb::Models | ||
module SportDb | ||
module Model | ||
|
||
class BonusRound < ActiveRecord::Base | ||
|
||
self.table_name = 'bonus_rounds' | ||
|
||
has_many :questions, :order => 'pos', :class_name => 'BonusQuestion', :foreign_key => 'round_id' | ||
has_many :questions, order: 'pos', class_name: 'BonusQuestion', foreign_key: 'round_id' | ||
belongs_to :pool | ||
|
||
end # class BonusRound | ||
|
||
end # module SportDb::Models | ||
end # module Model | ||
end # module SportDb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
module SportDb ; end # forward reference (for hoe require) | ||
|
||
module SportDb::Play | ||
VERSION = '0.2.2' | ||
module SportDb | ||
module Play | ||
VERSION = '0.2.3' | ||
end | ||
end | ||
|