Okechi Onyeje 384033bfe6 Added Index Route to Show Result Oysters
- set up index route to show osyters of a specific result
- set up index view, controller method, and route
- commented out debug console
2017-01-20 11:47:52 -05:00

13 lines
372 B
Ruby

class Oyster < ApplicationRecord
belongs_to :run
#Oyster.establish_connection(:"stats_#{Rails.env}")
Oyster.establish_connection(
:adapter => "mysql2",
:host => ENV['STATS_DB_URL'],
:username => ENV['STATS_DB_USER'],
:password => ENV['STATS_DB_PASS'],
:database => "main"
)
scope :run_id, -> (id) { where run_id: id.to_i }
end