acts_as_messenger 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/acts_as_messenger.gemspec +2 -1
- data/lib/acts_as_messenger.rb +2 -50
- data/lib/acts_as_messenger/message.rb +50 -0
- data/spec/debug.log +233 -0
- data/spec/spec_helper.rb +1 -1
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/acts_as_messenger.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_messenger}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mike Nelson"]
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"generators/acts_as_messenger/templates/models/message_thread.rb",
|
31
31
|
"generators/acts_as_messenger/templates/models/recipient.rb",
|
32
32
|
"lib/acts_as_messenger.rb",
|
33
|
+
"lib/acts_as_messenger/message.rb",
|
33
34
|
"lib/acts_as_messenger/thread.rb",
|
34
35
|
"spec/acts_as_messenger_spec.rb",
|
35
36
|
"spec/database.yml",
|
data/lib/acts_as_messenger.rb
CHANGED
@@ -1,50 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def self.included(model)
|
4
|
-
model.extend(SocialButterfly::Message::ClassMethods)
|
5
|
-
model.send(:include, SocialButterfly::Message::InstanceMethods)
|
6
|
-
end
|
7
|
-
|
8
|
-
module ClassMethods
|
9
|
-
def acts_as_messenger
|
10
|
-
has_many :recipients, :as => :receiver
|
11
|
-
has_many :unread_recipients, :source => :recipients, :class_name => 'Recipient', :as => :receiver, :conditions => {:read => false}
|
12
|
-
has_many :read_recipients, :source => :recipients, :class_name => 'Recipient', :as => :receiver, :conditions => {:read => true}
|
13
|
-
|
14
|
-
has_many :sent_messages, :class_name => 'MessageThread', :foreign_key => :author_id
|
15
|
-
has_many :unread_messages, :through => :unread_recipients, :source => :message_thread
|
16
|
-
has_many :read_messages, :through => :read_recipients, :source => :message_thread
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
module InstanceMethods
|
21
|
-
def send_message(title, body, recips)
|
22
|
-
thread = ::MessageThread.create(:author => self, :title => title, :body => body, :private_thread => true)
|
23
|
-
thread.recipients = [recips].flatten.uniq.collect{|r| rdata = recipient_data(r); thread.recipients.create(:receiver_id => rdata[0], :receiver_type => rdata[1])}
|
24
|
-
thread
|
25
|
-
end
|
26
|
-
def recipient_for(message)
|
27
|
-
self.recipients.find(:first, :conditions => ['message_thread_id = ?', message.id])
|
28
|
-
end
|
29
|
-
|
30
|
-
def comment_on(message, body)
|
31
|
-
if message && body
|
32
|
-
message.comments.create(:author => self, :body => body)
|
33
|
-
recip = recipient_for(message)
|
34
|
-
(message.recipients - [recip].compact).each{|r| r.unread!}
|
35
|
-
true
|
36
|
-
else
|
37
|
-
false
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
def recipient_data(given)
|
44
|
-
given.is_a?(Fixnum) && [given, self.class.name] || [given.id, given.class.name]
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
::ActiveRecord::Base.send :include, SocialButterfly::Message
|
1
|
+
require File.dirname(__FILE__) + '/acts_as_messenger/thread.rb'
|
2
|
+
require File.dirname(__FILE__) + '/acts_as_messenger/message.rb'
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module SocialButterfly
|
2
|
+
module Message
|
3
|
+
def self.included(model)
|
4
|
+
model.extend(SocialButterfly::Message::ClassMethods)
|
5
|
+
model.send(:include, SocialButterfly::Message::InstanceMethods)
|
6
|
+
end
|
7
|
+
|
8
|
+
module ClassMethods
|
9
|
+
def acts_as_messenger
|
10
|
+
has_many :recipients, :as => :receiver
|
11
|
+
has_many :unread_recipients, :source => :recipients, :class_name => 'Recipient', :as => :receiver, :conditions => {:read => false}
|
12
|
+
has_many :read_recipients, :source => :recipients, :class_name => 'Recipient', :as => :receiver, :conditions => {:read => true}
|
13
|
+
|
14
|
+
has_many :sent_messages, :class_name => 'MessageThread', :foreign_key => :author_id
|
15
|
+
has_many :unread_messages, :through => :unread_recipients, :source => :message_thread
|
16
|
+
has_many :read_messages, :through => :read_recipients, :source => :message_thread
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
module InstanceMethods
|
21
|
+
def send_message(title, body, recips)
|
22
|
+
thread = ::MessageThread.create(:author => self, :title => title, :body => body, :private_thread => true)
|
23
|
+
thread.recipients = [recips].flatten.uniq.collect{|r| rdata = recipient_data(r); thread.recipients.create(:receiver_id => rdata[0], :receiver_type => rdata[1])}
|
24
|
+
thread
|
25
|
+
end
|
26
|
+
def recipient_for(message)
|
27
|
+
self.recipients.find(:first, :conditions => ['message_thread_id = ?', message.id])
|
28
|
+
end
|
29
|
+
|
30
|
+
def comment_on(message, body)
|
31
|
+
if message && body
|
32
|
+
message.comments.create(:author => self, :body => body)
|
33
|
+
recip = recipient_for(message)
|
34
|
+
(message.recipients - [recip].compact).each{|r| r.unread!}
|
35
|
+
true
|
36
|
+
else
|
37
|
+
false
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def recipient_data(given)
|
44
|
+
given.is_a?(Fixnum) && [given, self.class.name] || [given.id, given.class.name]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
::ActiveRecord::Base.send :include, SocialButterfly::Message
|
data/spec/debug.log
CHANGED
@@ -2517,3 +2517,236 @@
|
|
2517
2517
|
[4;36;1mUser Load (0.5ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) [0m
|
2518
2518
|
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC[0m
|
2519
2519
|
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) [0m
|
2520
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mSET NAMES 'utf8'[0m
|
2521
|
+
[4;35;1mSQL (0.1ms)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
|
2522
|
+
[4;36;1mSQL (72.5ms)[0m [0;1mSHOW TABLES[0m
|
2523
|
+
[4;35;1mSQL (44.3ms)[0m [0mDROP TABLE `comments`[0m
|
2524
|
+
[4;36;1mSQL (81.9ms)[0m [0;1mCREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
2525
|
+
[4;35;1mSQL (0.6ms)[0m [0mSHOW TABLES[0m
|
2526
|
+
[4;36;1mSQL (2.5ms)[0m [0;1mDROP TABLE `message_threads`[0m
|
2527
|
+
[4;35;1mSQL (333.6ms)[0m [0mCREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
2528
|
+
[4;36;1mSQL (1.2ms)[0m [0;1mSHOW TABLES[0m
|
2529
|
+
[4;35;1mSQL (5.9ms)[0m [0mDROP TABLE `recipients`[0m
|
2530
|
+
[4;36;1mSQL (113.4ms)[0m [0;1mCREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
2531
|
+
[4;35;1mSQL (0.7ms)[0m [0mSHOW TABLES[0m
|
2532
|
+
[4;36;1mSQL (3.1ms)[0m [0;1mDROP TABLE `users`[0m
|
2533
|
+
[4;35;1mSQL (141.2ms)[0m [0mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
2534
|
+
[4;36;1mSQL (0.9ms)[0m [0;1mSHOW TABLES[0m
|
2535
|
+
[4;35;1mSQL (0.9ms)[0m [0mSELECT version FROM `schema_migrations`[0m
|
2536
|
+
[4;36;1mUser Columns (1.7ms)[0m [0;1mSHOW FIELDS FROM `users`[0m
|
2537
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2538
|
+
[4;36;1mUser Create (0.2ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:39', '2010-02-02 01:10:39')[0m
|
2539
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2540
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2541
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:39', '2010-02-02 01:10:39')[0m
|
2542
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2543
|
+
[4;35;1mSQL (0.2ms)[0m [0mBEGIN[0m
|
2544
|
+
[4;36;1mUser Create (0.2ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2545
|
+
[4;35;1mSQL (18.9ms)[0m [0mCOMMIT[0m
|
2546
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mBEGIN[0m
|
2547
|
+
[4;35;1mUser Create (0.3ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2548
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2549
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2550
|
+
[4;36;1mUser Create (0.2ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2551
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2552
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2553
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2554
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2555
|
+
[4;35;1mMessageThread Columns (1.6ms)[0m [0mSHOW FIELDS FROM `message_threads`[0m
|
2556
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2557
|
+
[4;35;1mMessageThread Create (0.2ms)[0m [0mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title', 'Body', '2010-02-02 01:10:40', 1, 4)[0m
|
2558
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2559
|
+
[4;35;1mRecipient Columns (1.3ms)[0m [0mSHOW FIELDS FROM `recipients`[0m
|
2560
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2561
|
+
[4;35;1mRecipient Create (0.2ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 5, '2010-02-02 01:10:40', NULL, 1)[0m
|
2562
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2563
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC[0m
|
2564
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2565
|
+
[4;35;1mSQL (0.1ms)[0m [0mCOMMIT[0m
|
2566
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2567
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2568
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2569
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2570
|
+
[4;36;1mUser Create (0.2ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2571
|
+
[4;35;1mSQL (8.1ms)[0m [0mCOMMIT[0m
|
2572
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2573
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2574
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2575
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2576
|
+
[4;36;1mMessageThread Create (0.2ms)[0m [0;1mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 1', 'Body 1', '2010-02-02 01:10:40', 1, 7)[0m
|
2577
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2578
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2579
|
+
[4;35;1mRecipient Create (0.3ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 8, '2010-02-02 01:10:40', NULL, 2)[0m
|
2580
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2581
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC[0m
|
2582
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2583
|
+
[4;35;1mSQL (0.1ms)[0m [0mCOMMIT[0m
|
2584
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') [0m
|
2585
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') [0m
|
2586
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2587
|
+
[4;35;1mMessageThread Create (0.2ms)[0m [0mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 2', 'Body 2', '2010-02-02 01:10:40', 1, 8)[0m
|
2588
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2589
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2590
|
+
[4;36;1mRecipient Create (0.2ms)[0m [0;1mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 7, '2010-02-02 01:10:40', NULL, 3)[0m
|
2591
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2592
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2593
|
+
[4;35;1mRecipient Create (0.1ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 9, '2010-02-02 01:10:40', NULL, 3)[0m
|
2594
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2595
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC[0m
|
2596
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2597
|
+
[4;35;1mSQL (0.1ms)[0m [0mCOMMIT[0m
|
2598
|
+
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 7) [0m
|
2599
|
+
[4;35;1mUser Load (0.1ms)[0m [0mSELECT * FROM `users` WHERE (`users`.`id` = 8) [0m
|
2600
|
+
[4;36;1mUser Load (0.1ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 9) [0m
|
2601
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') [0m
|
2602
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') [0m
|
2603
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') [0m
|
2604
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2605
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2606
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2607
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2608
|
+
[4;36;1mUser Create (0.1ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2609
|
+
[4;35;1mSQL (1.0ms)[0m [0mCOMMIT[0m
|
2610
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2611
|
+
[4;35;1mUser Create (0.1ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2612
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2613
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2614
|
+
[4;36;1mMessageThread Create (0.2ms)[0m [0;1mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 3', 'Body 3', '2010-02-02 01:10:40', 1, 10)[0m
|
2615
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2616
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2617
|
+
[4;35;1mRecipient Create (0.2ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 11, '2010-02-02 01:10:40', NULL, 4)[0m
|
2618
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2619
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2620
|
+
[4;36;1mRecipient Create (0.1ms)[0m [0;1mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 12, '2010-02-02 01:10:40', NULL, 4)[0m
|
2621
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2622
|
+
[4;36;1mRecipient Load (0.3ms)[0m [0;1mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC[0m
|
2623
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2624
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mCOMMIT[0m
|
2625
|
+
[4;35;1mRecipient Load (0.2ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2626
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2627
|
+
[4;35;1mRecipient Update (0.2ms)[0m [0mUPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 1 WHERE `id` = 5[0m
|
2628
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2629
|
+
[4;35;1mSQL (0.4ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) [0m
|
2630
|
+
[4;36;1mSQL (0.3ms)[0m [0;1mSELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) [0m
|
2631
|
+
[4;35;1mComment Columns (1.4ms)[0m [0mSHOW FIELDS FROM `comments`[0m
|
2632
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2633
|
+
[4;35;1mComment Create (0.2ms)[0m [0mINSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'This is totally awesome', 4, '2010-02-02 01:10:40', 12)[0m
|
2634
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2635
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2636
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2637
|
+
[4;35;1mRecipient Update (0.2ms)[0m [0mUPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 5[0m
|
2638
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2639
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) [0m
|
2640
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mSELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) [0m
|
2641
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2642
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2643
|
+
[4;35;1mRecipient Destroy (0.2ms)[0m [0mDELETE FROM `recipients` WHERE `id` = 5[0m
|
2644
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2645
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2646
|
+
[4;36;1mComment Create (0.2ms)[0m [0;1mINSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Seriously, i love this', 4, '2010-02-02 01:10:40', 12)[0m
|
2647
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2648
|
+
[4;36;1mRecipient Load (0.3ms)[0m [0;1mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2649
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2650
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mCOMMIT[0m
|
2651
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') [0m
|
2652
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2653
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2654
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2655
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2656
|
+
[4;36;1mUser Create (0.1ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2657
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2658
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2659
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2660
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2661
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2662
|
+
[4;36;1mMessageThread Create (0.2ms)[0m [0;1mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 4', 'Body 4', '2010-02-02 01:10:40', 1, 13)[0m
|
2663
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2664
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2665
|
+
[4;35;1mRecipient Create (0.2ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 14, '2010-02-02 01:10:40', NULL, 5)[0m
|
2666
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2667
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2668
|
+
[4;36;1mRecipient Create (0.2ms)[0m [0;1mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 15, '2010-02-02 01:10:40', NULL, 5)[0m
|
2669
|
+
[4;35;1mSQL (0.7ms)[0m [0mCOMMIT[0m
|
2670
|
+
[4;36;1mRecipient Load (0.3ms)[0m [0;1mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC[0m
|
2671
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2672
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mCOMMIT[0m
|
2673
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') [0m
|
2674
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2675
|
+
[4;35;1mComment Load (0.2ms)[0m [0mSELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') ORDER BY created_at asc[0m
|
2676
|
+
[4;36;1mRecipient Destroy (0.2ms)[0m [0;1mDELETE FROM `recipients` WHERE `id` = 7[0m
|
2677
|
+
[4;35;1mRecipient Destroy (0.1ms)[0m [0mDELETE FROM `recipients` WHERE `id` = 8[0m
|
2678
|
+
[4;36;1mMessageThread Destroy (0.1ms)[0m [0;1mDELETE FROM `message_threads` WHERE `id` = 5[0m
|
2679
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2680
|
+
[4;36;1mSQL (0.2ms)[0m [0;1mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') [0m
|
2681
|
+
[4;35;1mSQL (0.2ms)[0m [0mSELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') [0m
|
2682
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2683
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2684
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2685
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2686
|
+
[4;36;1mUser Create (0.1ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2687
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2688
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2689
|
+
[4;35;1mUser Create (0.1ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2690
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2691
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2692
|
+
[4;36;1mMessageThread Create (0.2ms)[0m [0;1mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 5', 'Body 5', '2010-02-02 01:10:40', 1, 16)[0m
|
2693
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2694
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2695
|
+
[4;35;1mRecipient Create (0.2ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 17, '2010-02-02 01:10:40', NULL, 6)[0m
|
2696
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2697
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2698
|
+
[4;36;1mRecipient Create (0.1ms)[0m [0;1mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 18, '2010-02-02 01:10:40', NULL, 6)[0m
|
2699
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2700
|
+
[4;36;1mRecipient Load (0.3ms)[0m [0;1mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC[0m
|
2701
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2702
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mCOMMIT[0m
|
2703
|
+
[4;35;1mUser Load (0.3ms)[0m [0mSELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) [0m
|
2704
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2705
|
+
[4;35;1mComment Create (0.2ms)[0m [0mINSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Test', 6, '2010-02-02 01:10:40', 17)[0m
|
2706
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2707
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2708
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2709
|
+
[4;35;1mRecipient Update (0.2ms)[0m [0mUPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 10[0m
|
2710
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2711
|
+
[4;35;1mMessageThread Load (0.2ms)[0m [0mSELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) [0m
|
2712
|
+
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` = 16) [0m
|
2713
|
+
[4;35;1mUser Load (0.3ms)[0m [0mSELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) [0m
|
2714
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2715
|
+
[4;35;1mComment Create (0.2ms)[0m [0mINSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Tester', 6, '2010-02-02 01:10:40', 18)[0m
|
2716
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2717
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1[0m
|
2718
|
+
[4;36;1mRecipient Load (0.2ms)[0m [0;1mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC[0m
|
2719
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2720
|
+
[4;36;1mRecipient Update (0.2ms)[0m [0;1mUPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 9[0m
|
2721
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2722
|
+
[4;36;1mMessageThread Load (0.2ms)[0m [0;1mSELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) [0m
|
2723
|
+
[4;35;1mUser Load (0.1ms)[0m [0mSELECT * FROM `users` WHERE (`users`.`id` = 16) [0m
|
2724
|
+
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) [0m
|
2725
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2726
|
+
[4;36;1mUser Create (0.2ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2727
|
+
[4;35;1mSQL (0.5ms)[0m [0mCOMMIT[0m
|
2728
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2729
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2730
|
+
[4;36;1mSQL (0.6ms)[0m [0;1mCOMMIT[0m
|
2731
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2732
|
+
[4;36;1mUser Create (0.1ms)[0m [0;1mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2733
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2734
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2735
|
+
[4;35;1mMessageThread Create (0.2ms)[0m [0mINSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 6', 'Body 6', '2010-02-02 01:10:40', 1, 19)[0m
|
2736
|
+
[4;36;1mSQL (0.5ms)[0m [0;1mCOMMIT[0m
|
2737
|
+
[4;35;1mSQL (0.1ms)[0m [0mBEGIN[0m
|
2738
|
+
[4;36;1mRecipient Create (0.2ms)[0m [0;1mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 20, '2010-02-02 01:10:40', NULL, 7)[0m
|
2739
|
+
[4;35;1mSQL (0.6ms)[0m [0mCOMMIT[0m
|
2740
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2741
|
+
[4;35;1mRecipient Create (0.2ms)[0m [0mINSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 21, '2010-02-02 01:10:40', NULL, 7)[0m
|
2742
|
+
[4;36;1mSQL (0.9ms)[0m [0;1mCOMMIT[0m
|
2743
|
+
[4;35;1mRecipient Load (0.3ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC[0m
|
2744
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2745
|
+
[4;35;1mSQL (0.1ms)[0m [0mCOMMIT[0m
|
2746
|
+
[4;36;1mSQL (0.1ms)[0m [0;1mBEGIN[0m
|
2747
|
+
[4;35;1mUser Create (0.2ms)[0m [0mINSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-02 01:10:40', '2010-02-02 01:10:40')[0m
|
2748
|
+
[4;36;1mSQL (0.7ms)[0m [0;1mCOMMIT[0m
|
2749
|
+
[4;35;1mRecipient Load (0.2ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC[0m
|
2750
|
+
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) [0m
|
2751
|
+
[4;35;1mRecipient Load (0.2ms)[0m [0mSELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC[0m
|
2752
|
+
[4;36;1mUser Load (0.2ms)[0m [0;1mSELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) [0m
|
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,7 @@ require 'spec/autorun'
|
|
9
9
|
require 'models/user.rb'
|
10
10
|
require File.dirname(__FILE__) + "/../lib/acts_as_messenger/thread"
|
11
11
|
%w(comment message_thread recipient).each do |model|
|
12
|
-
require File.dirname(__FILE__) + "/../generators/acts_as_messenger/models/#{model}.rb"
|
12
|
+
require File.dirname(__FILE__) + "/../generators/acts_as_messenger/templates/models/#{model}.rb"
|
13
13
|
end
|
14
14
|
|
15
15
|
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + '/debug.log')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_messenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nelson
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- generators/acts_as_messenger/templates/models/message_thread.rb
|
56
56
|
- generators/acts_as_messenger/templates/models/recipient.rb
|
57
57
|
- lib/acts_as_messenger.rb
|
58
|
+
- lib/acts_as_messenger/message.rb
|
58
59
|
- lib/acts_as_messenger/thread.rb
|
59
60
|
- spec/acts_as_messenger_spec.rb
|
60
61
|
- spec/database.yml
|