private_mail 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mailbox.rb +3 -3
- data/lib/private_mail/version.rb +1 -1
- metadata +8 -5
data/lib/mailbox.rb
CHANGED
@@ -37,7 +37,7 @@ module PrivateMail
|
|
37
37
|
# #get number of unread mail messages in phil's inbox
|
38
38
|
# phil.mailbox[:inbox].mail_count(:unread)
|
39
39
|
#
|
40
|
-
def
|
40
|
+
def count(filter = :all, options = {})
|
41
41
|
default_options = {:conditions => ["mail_items.user_id = ?", @user.id]}
|
42
42
|
add_mailbox_condition!(default_options, @type)
|
43
43
|
add_conditions!(default_options, "mail_items.read = ?", filter == :read) unless filter == :all
|
@@ -281,12 +281,12 @@ module PrivateMail
|
|
281
281
|
|
282
282
|
def delete_mail(default_options, options)
|
283
283
|
build_options(default_options, options) unless options.empty?
|
284
|
-
return
|
284
|
+
return MailItem.delete_all(default_options[:conditions])
|
285
285
|
end
|
286
286
|
|
287
287
|
def count_mail(default_options, options)
|
288
288
|
build_options(default_options, options) unless options.empty?
|
289
|
-
return
|
289
|
+
return MailItem.count(:all, default_options)
|
290
290
|
end
|
291
291
|
|
292
292
|
def build_options(default_options, options)
|
data/lib/private_mail/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: private_mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-31 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &2163713340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2163713340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2163711720 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2163711720
|
36
36
|
description: Enables User models in Rails 3.1+ apps to have simple private messaging
|
37
37
|
capabilites between them.
|
38
38
|
email: john@mcdowall.info
|
@@ -63,6 +63,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
- - ! '>='
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
hash: -2975307615983657336
|
66
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
70
|
none: false
|
68
71
|
requirements:
|