acts-as-messageable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -9,6 +9,17 @@ module ActsAsMessageable
|
|
9
9
|
:received_messageable_id,
|
10
10
|
:sent_messageable_type,
|
11
11
|
:sent_messageable_id,
|
12
|
+
:opened
|
13
|
+
|
14
|
+
validates_presence_of :topic ,:body
|
15
|
+
|
16
|
+
def open?
|
17
|
+
self.opened?
|
18
|
+
end
|
19
|
+
|
20
|
+
def open
|
21
|
+
self.opened = true
|
22
|
+
end
|
12
23
|
|
13
24
|
def from
|
14
25
|
"#{self.sent_messageable_type}".constantize.find(self.sent_messageable_id)
|
@@ -5,6 +5,7 @@ class CreateMessagesTable < ActiveRecord::Migration
|
|
5
5
|
t.string :body
|
6
6
|
t.references :received_messageable, :polymorphic => true
|
7
7
|
t.references :sent_messageable, :polymorphic => true
|
8
|
+
t.boolean :opened, :default => false
|
8
9
|
end
|
9
10
|
|
10
11
|
add_index :messages, [:sent_messageable_id, :received_messageable_id]
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Piotr Nielacny
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-04 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|