mailboxer 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/mailboxer/engine.rb +2 -2
- data/lib/mailboxer/models/messageable.rb +8 -7
- data/mailboxer.gemspec +1 -1
- 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: b75e4674f36049f58d692746092d286f776e345d
|
4
|
+
data.tar.gz: b050be17fc293c2e10080f224d0613ccc8909196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7192237a5405c6ea024790fdd6ad5c4c3a851c871e40fbd6025b5770db0f77977387d4158b52b8614d0b58e5cd3729f9a7a310ada2557200067887d9a008de1b
|
7
|
+
data.tar.gz: 69ee9d1a2206f89142fc32b0c679faeb54e09b3044a5a832db94c998db01746c244e819cf27fd0516005e9da991babd7496d20dd0962d5fc816feb5782cd6b54
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Mailboxer 0.
|
1
|
+
# Mailboxer 0.10.x [![](https://secure.travis-ci.org/ging/mailboxer.png)](http://travis-ci.org/ging/mailboxer) [![](https://gemnasium.com/ging/mailboxer.png)](https://gemnasium.com/ging/mailboxer)
|
2
2
|
|
3
3
|
This project is based on the need of a private message system for [ging
|
4
4
|
/ social\_stream](https://github.com/ging/social_stream). Instead of creating our core message system heavily
|
data/lib/mailboxer/engine.rb
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
module Mailboxer
|
2
2
|
module Models
|
3
3
|
module Messageable
|
4
|
-
|
5
|
-
mod.extend(ClassMethods)
|
6
|
-
end
|
4
|
+
extend ActiveSupport::Concern
|
7
5
|
|
8
|
-
module
|
6
|
+
module ActiveRecord
|
9
7
|
#Converts the model into messageable allowing it to interchange messages and
|
10
8
|
#receive notifications
|
11
9
|
def acts_as_messageable
|
12
|
-
|
13
|
-
has_many :receipts, :order => 'created_at DESC', :dependent => :destroy, :as => :receiver
|
14
|
-
|
10
|
+
include Messageable
|
15
11
|
end
|
16
12
|
end
|
17
13
|
|
14
|
+
included do
|
15
|
+
has_many :messages, :as => :sender
|
16
|
+
has_many :receipts, :order => 'created_at DESC', :dependent => :destroy, :as => :receiver
|
17
|
+
end
|
18
|
+
|
18
19
|
unless defined?(Mailboxer.name_method)
|
19
20
|
# Returning any kind of identification you want for the model
|
20
21
|
define_method Mailboxer.name_method do
|
data/mailboxer.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "mailboxer"
|
3
|
-
s.version = "0.10.
|
3
|
+
s.version = "0.10.1"
|
4
4
|
s.authors = ["Eduardo Casanova Cuesta"]
|
5
5
|
s.summary = "Messaging system for rails apps."
|
6
6
|
s.description = "A Rails engine that allows any model to act as messageable, adding the ability to exchange messages " +
|