public
Description: A sample Hobo app - similar to meetup.com
Clone URL: git://github.com/drnic/hobo-meeting-app.git
Search Repo:
added user as owner of a Meeting
drnic (author)
Sat May 17 04:14:28 -0700 2008
commit  d5f26adeca124bec0f424486fa16a81da9ff6fbe
tree    b3b503429ce9ee155308827490c9fc4902543b6d
parent  5ce7a95ee2746af877c0561991ccf97216d0e31d
...
12
13
14
15
 
16
 
 
 
17
18
19
20
 
21
22
23
...
12
13
14
 
15
16
17
18
19
20
21
22
 
23
24
25
26
0
@@ -12,12 +12,15 @@
0
   end
0
 
0
   has_many :meeting_attendances, :dependent => :destroy
0
- has_many :attendees, :through => :meeting_attendances, :source => :user, :managed => true
0
+ has_many :users, :through => :meeting_attendances, :source => :user, :managed => true
0
 
0
+ belongs_to :user, :creator => true
0
+
0
+
0
   # --- Hobo Permissions --- #
0
 
0
   def creatable_by?(user)
0
- user.administrator?
0
+ !user.guest?
0
   end
0
 
0
   def updatable_by?(user, new)
...
7
8
9
10
 
11
12
13
14
15
16
 
17
18
19
...
7
8
9
 
10
11
12
13
14
15
 
16
17
18
19
0
@@ -7,13 +7,13 @@
0
     timestamps
0
   end
0
 
0
- belongs_to :user
0
+ belongs_to :user, :creator => true
0
   belongs_to :meeting
0
 
0
   # --- Hobo Permissions --- #
0
 
0
   def creatable_by?(user)
0
- !user.guest? #user.administrator?
0
+ !user.guest??
0
   end
0
 
0
   def updatable_by?(user, new)
...
9
10
11
12
 
13
14
15
...
27
28
29
 
30
31
32
...
9
10
11
 
12
13
14
15
...
27
28
29
30
31
32
33
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 => 3) do
0
+ActiveRecord::Schema.define(:version => 4) do
0
 
0
   create_table "meeting_attendances", :force => true do |t|
0
     t.string "status"
0
@@ -27,6 +27,7 @@
0
     t.datetime "end_time"
0
     t.datetime "created_at"
0
     t.datetime "updated_at"
0
+ t.integer "user_id"
0
   end
0
 
0
   create_table "users", :force => true do |t|

Comments

    No one has commented yet.