public
Description: Canberra Ruby Crew Site #crc
Homepage: http://canberraruby.com
Clone URL: git://github.com/artpop/crc_site.git
added topics scaffold
schlick (author)
Thu Oct 23 07:17:14 -0700 2008
commit  f10022b0044347b59ccff24bee6e132d3cae3168
tree    1038118a0bb96c211c16bb5458934d82ec643b4d
parent  d09b1b63fb9c1eefd41963b0436772d9dde61ab4
0
...
1
2
3
 
 
 
4
...
1
 
2
3
4
5
6
0
@@ -1,2 +1,4 @@
0
 Flesh out the meetings function
0
-- I've generated a meetings scaffold and want to have a facility to record details about meetings like members who attended and what was discussed and links to any resources
0
\ No newline at end of file
0
+- I've generated a meetings scaffold and want to have a facility to record details about meetings like members who attended and what was discussed and links to any resources
0
+- play around with the datepicker - what about time? and customising the datepicker, maybe make it inline
0
+- topics should probably be a nested resource of meetings
0
\ No newline at end of file
...
7
8
9
10
 
 
11
12
13
...
7
8
9
 
10
11
12
13
14
0
@@ -7,7 +7,8 @@ class Meeting < ActiveRecord::Base
0
   # returns an array of all the meetings held before today in order from latest to oldest (reverse chronological order)
0
   # past.first returns the last held meeting prior to today
0
   named_scope :past, :conditions => ['date < ?', Date.today], :order => 'date DESC'
0
-  
0
+
0
+  has_many    :topics,       :dependent => :destroy
0
   has_many    :attendances,  :dependent => :destroy
0
   has_many    :attendees,    :through => :attendances, :order => :name, :source => :person
0
 
...
5
6
7
 
 
 
 
 
 
 
 
 
8
9
10
...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
0
@@ -5,6 +5,15 @@
0
 %p
0
   %strong Venue:
0
   =h @meeting.venue
0
+  
0
+%p
0
+  %strong Topics:
0
+%ul
0
+  - for topic in @meeting.topics
0
+    %li
0
+      = link_to topic.title, topic.link
0
+      \-
0
+      = topic.description
0
 
0
 %p
0
   %strong Attendees:
...
1
 
 
2
3
4
...
1
2
3
4
5
6
0
@@ -1,4 +1,6 @@
0
 ActionController::Routing::Routes.draw do |map|
0
+  map.resources :topics
0
+
0
   map.resources :meetings
0
 
0
 
...
9
10
11
12
 
13
14
15
...
81
82
83
 
 
 
 
 
 
 
 
 
84
...
9
10
11
 
12
13
14
15
...
81
82
83
84
85
86
87
88
89
90
91
92
93
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 => 20081020105053) do
0
+ActiveRecord::Schema.define(:version => 20081023140716) do
0
 
0
   create_table "attendances", :force => true do |t|
0
     t.integer  "person_id",  :limit => 11
0
@@ -81,4 +81,13 @@ ActiveRecord::Schema.define(:version => 20081020105053) do
0
     t.string   "twitter_user"
0
   end
0
 
0
+  create_table "topics", :force => true do |t|
0
+    t.string   "title"
0
+    t.text     "description"
0
+    t.string   "link"
0
+    t.integer  "meeting_id",  :limit => 11
0
+    t.datetime "created_at"
0
+    t.datetime "updated_at"
0
+  end
0
+
0
 end

Comments