mallet 0.0.7 → 0.0.8
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/Gemfile.lock +1 -1
- data/lib/mallet/mail.rb +10 -1
- data/lib/mallet/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/mallet/mail.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Mallet
|
|
|
5
5
|
|
|
6
6
|
attr_accessible :workflow_state
|
|
7
7
|
|
|
8
|
-
belongs_to :malletable, polymorphic: true
|
|
8
|
+
#belongs_to :malletable, polymorphic: true
|
|
9
9
|
|
|
10
10
|
scope :pending, where(workflow_state: 'pending')
|
|
11
11
|
scope :sent, where(workflow_state: 'sent')
|
|
@@ -32,6 +32,15 @@ module Mallet
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
def malletable
|
|
36
|
+
malletable_type.constantize.find(malletable_id)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def malletable=(thing)
|
|
40
|
+
self.malletable_type = thing.class.name
|
|
41
|
+
self.malletable_id = thing.id
|
|
42
|
+
end
|
|
43
|
+
|
|
35
44
|
def validate
|
|
36
45
|
raise Exception unless DEFINITIONS.has_key?(definition)
|
|
37
46
|
raise Exception unless mailer_class.constantize.ancestors.include? ActionMailer::Base
|
data/lib/mallet/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mallet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2013-
|
|
13
|
+
date: 2013-05-17 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|