public
Description: Canberra Ruby Crew Site #crc
Homepage: http://canberraruby.com
Clone URL: git://github.com/artpop/crc_site.git
added a particaption has many through relationship for meetings and people
schlick (author)
Sun Oct 19 07:13:39 -0700 2008
commit  d20c783c4dfd3c6c6b3e753d72b53cc173b7c8fc
tree    fb43107a52853fb6faafcb8beb001decbf34f87c
parent  39fbf0dfc248e39744200e20279175d2bc31818f
...
1
 
 
 
 
 
 
 
2
...
1
2
3
4
5
6
7
8
9
0
@@ -1,2 +1,9 @@
0
 class Meeting < ActiveRecord::Base
0
+  
0
+  has_many    :participations,  :dependent => :destroy
0
+  has_many    :participants,    :through => :participations, :source => :person
0
+
0
+  validates_presence_of :date
0
+  validates_presence_of :venue
0
+  
0
 end
...
9
10
11
12
 
13
14
15
...
64
65
66
 
 
 
 
 
 
 
67
68
69
...
9
10
11
 
12
13
14
15
...
64
65
66
67
68
69
70
71
72
73
74
75
76
0
@@ -9,7 +9,7 @@
0
 #
0
 # It's strongly recommended to check this file into your version control system.
0
 
0
-ActiveRecord::Schema.define(:version => 20081018210850) do
0
+ActiveRecord::Schema.define(:version => 20081019120723) do
0
 
0
   create_table "bj_config", :primary_key => "bj_config_id", :force => true do |t|
0
     t.text "hostname"
0
@@ -64,6 +64,13 @@ ActiveRecord::Schema.define(:version => 20081018210850) do
0
     t.datetime "updated_at"
0
   end
0
 
0
+  create_table "participations", :force => true do |t|
0
+    t.integer  "person_id",  :limit => 11
0
+    t.integer  "meeting_id", :limit => 11
0
+    t.datetime "created_at"
0
+    t.datetime "updated_at"
0
+  end
0
+
0
   create_table "people", :force => true do |t|
0
     t.string   "username"
0
     t.string   "name"

Comments