-
Notifications
You must be signed in to change notification settings - Fork 49
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
11 changed files
with
30 additions
and
221 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
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,21 +1,3 @@ | ||
|
||
class EventQuote < ActiveRecord::Base | ||
|
||
self.table_name = 'event_quotes' | ||
|
||
belongs_to :service | ||
belongs_to :event | ||
belongs_to :team | ||
EventQuote = SportDB::Models::EventQuote | ||
|
||
def self.create_from_ary!( teams_with_odds, service, event ) | ||
teams_with_odds.each do |values| | ||
EventQuote.create!( | ||
:service => service, | ||
:event => event, | ||
:team => values[0], | ||
:odds => values[1] ) | ||
end # each team | ||
end | ||
|
||
|
||
end # class EventQuote |
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,21 +1,4 @@ | ||
|
||
class GroupQuote < ActiveRecord::Base | ||
|
||
self.table_name = 'group_quotes' | ||
|
||
belongs_to :service | ||
belongs_to :group | ||
belongs_to :team | ||
|
||
def self.create_from_ary!( teams_with_odds, service, group ) | ||
teams_with_odds.each do |values| | ||
GroupQuote.create!( | ||
:service => service, | ||
:group => group, | ||
:team => values[0], | ||
:odds => values[1] ) | ||
end # each team | ||
end | ||
|
||
|
||
end # class GroupQuote | ||
GroupQuote = SportDB::Models::GroupQuote | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,5 @@ | |
# updated_at :datetime not null | ||
# | ||
|
||
Prop = SportDB::Models::Prop | ||
|
||
class Prop < ActiveRecord::Base | ||
|
||
end # class Prop |
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,30 +1,2 @@ | ||
|
||
class Quote < ActiveRecord::Base | ||
|
||
belongs_to :service | ||
belongs_to :game | ||
|
||
def self.create_from_ary!( games_with_odds, service ) | ||
games_with_odds.each do |values| | ||
Quote.create!( | ||
:service => service, | ||
:game => values[0], | ||
:odds1 => values[1], | ||
:oddsx => values[2], | ||
:odds2 => values[3]) | ||
end # each games | ||
end | ||
|
||
def self.create_from_ary_for_round!( games_with_odds, service, round ) | ||
games_with_odds.each do |values| | ||
Quote.create!( | ||
:service => service, | ||
:game => Game.find_by_round_id_and_team1_id_and_team2_id!( round.id, values[0].id, values[1].id), | ||
:odds1 => values[2], | ||
:oddsx => values[3], | ||
:odds2 => values[4]) | ||
end # each games | ||
end | ||
|
||
|
||
end # class Quote | ||
Quote = SportDB::Models::Quote |