parole 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/parole/templates/migration.rb +1 -1
- data/lib/parole.rb +8 -0
- data/lib/parole/version.rb +1 -1
- data/spec/spec_helper.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa7a50452389b800759094aa18ff625260946c25
|
4
|
+
data.tar.gz: 4afa76b5ba285edae56a3715cf470fbdd6a57c47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874411296ab97a6e4e148e2c057f247ee4ba504c02072976d337c4c0cf93b66a94c036445bd70d1d28ee61d3c06878f377426bf65fb44f0c50a08b18cd69cfbf
|
7
|
+
data.tar.gz: 43c3227696e550314dad9f94627dba9b648b988468994a21b3c15493802d7dd48cff9bc12c6388b66b400cce7ae0a54f8caa736f7ca80d396aa2a3d6c922ca2a
|
data/lib/parole.rb
CHANGED
@@ -8,6 +8,8 @@ require 'parole/comment'
|
|
8
8
|
|
9
9
|
class ActiveRecord::Base
|
10
10
|
def self.acts_as_commentable(options = {})
|
11
|
+
Parole.commentable_classes << self
|
12
|
+
|
11
13
|
class_attribute :commentable_options, :acts_as_commentable
|
12
14
|
self.acts_as_commentable = true
|
13
15
|
self.commentable_options = options.reverse_merge(roles: [])
|
@@ -24,3 +26,9 @@ class ActiveRecord::Base
|
|
24
26
|
include Parole::Comment
|
25
27
|
end
|
26
28
|
end
|
29
|
+
|
30
|
+
module Parole
|
31
|
+
def self.commentable_classes
|
32
|
+
@commentable_classes ||= []
|
33
|
+
end
|
34
|
+
end
|
data/lib/parole/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED