inboxes 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/inboxes/ability.rb +5 -4
- data/lib/inboxes/version.rb +1 -1
- metadata +3 -3
data/lib/inboxes/ability.rb
CHANGED
@@ -7,10 +7,11 @@ module Inboxes
|
|
7
7
|
def initialize(user)
|
8
8
|
# Discussion
|
9
9
|
# raise "Registered!"
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
if user
|
11
|
+
can [:index, :create], Discussion
|
12
|
+
can :read, Discussion do |discussion|
|
13
|
+
discussion.can_participate?(user)
|
14
|
+
end
|
14
15
|
end
|
15
16
|
|
16
17
|
# Message
|
data/lib/inboxes/version.rb
CHANGED
metadata
CHANGED