lib/sportradar/api/football/ncaafb/division.rb in sportradar-api-0.11.0 vs lib/sportradar/api/football/ncaafb/division.rb in sportradar-api-0.11.1
- old
+ new
@@ -9,11 +9,11 @@
# @response = data
@api = opts[:api]
@id = data["id"]
@name = data["name"]
- @alias = data["alias"]
+ @alias = data["alias"] || data["id"]
update(data, **opts)
end
def update(data, **opts)
@conferences_hash = create_data({}, data["conferences"], klass: Conference, division: self, api: @api) if data["conferences"]
@@ -26,10 +26,10 @@
def conference(code_name)
conferences_by_name[code_name]
end
def conferences_by_name
- @conferences_by_name ||= conferences.map { |c| [c.alias, c] }.to_h
+ @conferences_by_name ||= conferences.map { |c| [c.id, c] }.to_h
end
def teams
conferences.flat_map(&:teams)
end