diff options
author | 2010-12-03 17:51:34 +0100 | |
---|---|---|
committer | 2010-12-03 17:51:34 +0100 | |
commit | 1d69ab56c1a4ad2ba166ba66209c49e37aab4fca (patch) | |
tree | c403b78ef1c4ebd65d267aede5ad13612b650f57 | |
parent | Email answers allow checking signatures (diff) | |
download | recruiting-webapp-1d69ab56c1a4ad2ba166ba66209c49e37aab4fca.tar.gz recruiting-webapp-1d69ab56c1a4ad2ba166ba66209c49e37aab4fca.tar.bz2 recruiting-webapp-1d69ab56c1a4ad2ba166ba66209c49e37aab4fca.zip |
Load Mail::Message customization automatically
-rw-r--r-- | app/models/email_answer.rb | 1 | ||||
-rw-r--r-- | app/models/receiver.rb | 1 | ||||
-rw-r--r-- | config/initializers/custom_includes.rb | 1 | ||||
-rw-r--r-- | lib/message.rb | 3 | ||||
-rw-r--r-- | spec/helpers/message_spec.rb | 1 |
5 files changed, 1 insertions, 6 deletions
diff --git a/app/models/email_answer.rb b/app/models/email_answer.rb index fe21fb1..ffec1ac 100644 --- a/app/models/email_answer.rb +++ b/app/models/email_answer.rb @@ -14,7 +14,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Model storing answers for questions with email content. # No user is allowed to do anything except viewing. -require 'message.rb' class EmailAnswer < Answer fields do correct :boolean diff --git a/app/models/receiver.rb b/app/models/receiver.rb index 2235984..e7ba20b 100644 --- a/app/models/receiver.rb +++ b/app/models/receiver.rb @@ -1,4 +1,3 @@ -require 'message.rb' class Receiver def self.receive(text) # For now email answers for questions are only emails app receives diff --git a/config/initializers/custom_includes.rb b/config/initializers/custom_includes.rb new file mode 100644 index 0000000..8656171 --- /dev/null +++ b/config/initializers/custom_includes.rb @@ -0,0 +1 @@ +require 'message.rb' diff --git a/lib/message.rb b/lib/message.rb index a860c59..1841809 100644 --- a/lib/message.rb +++ b/lib/message.rb @@ -1,6 +1,3 @@ -# This must not be automagically included. -# If this is included automatically Mail gem will not load properly and -# things will break. module Mail class Message def signatures diff --git a/spec/helpers/message_spec.rb b/spec/helpers/message_spec.rb index 430c03d..c7d2294 100644 --- a/spec/helpers/message_spec.rb +++ b/spec/helpers/message_spec.rb @@ -1,5 +1,4 @@ require 'spec_helper.rb' -require 'message.rb' describe Mail::Message do it "should recognize signatures" do mails_dir = "#{RAILS_ROOT}/spec/files" |