From aca5e758b45d8e66b400ffbc6e5a70a3dc7aa696 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sat, 3 Nov 2012 22:20:05 -0500 Subject: [PATCH] * VRFS-34 and VRFS-61; forgot to add new connection_track model --- lib/jam_ruby/models/connection_track.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/jam_ruby/models/connection_track.rb diff --git a/lib/jam_ruby/models/connection_track.rb b/lib/jam_ruby/models/connection_track.rb new file mode 100644 index 000000000..303d1534c --- /dev/null +++ b/lib/jam_ruby/models/connection_track.rb @@ -0,0 +1,15 @@ +module JamRuby + class ConnectionTrack < ActiveRecord::Base + + self.table_name = "connections_tracks" + + self.primary_key = 'id' + + SOUND = %w(mono stereo) + + belongs_to :connection, :class_name => "JamRuby::Connection", :inverse_of => :connection_tracks + belongs_to :instrument, :class_name => "JamRuby::Instrument", :inverse_of => :connection_tracks + + validates :sound, :inclusion => {:in => SOUND} + end +end \ No newline at end of file