summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/sms_fu.rb1
-rw-r--r--lib/sms_notifier.rb9
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/sms_fu.rb b/lib/sms_fu.rb
index 4f77735..9533341 100644
--- a/lib/sms_fu.rb
+++ b/lib/sms_fu.rb
@@ -1,4 +1,5 @@
require 'yaml'
+require 'sms_notifier'
# Copyright (c) 2008 Brendan G. Lim (brendangl@gmail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lib/sms_notifier.rb b/lib/sms_notifier.rb
index cf698c8..1dff814 100644
--- a/lib/sms_notifier.rb
+++ b/lib/sms_notifier.rb
@@ -33,8 +33,13 @@ class SmsNotifier < ActionMailer::Base
body['message'] = message
end
- def template_root
- "#{File.dirname(__FILE__)}/../views"
+ view_path = File.join(File.dirname(__FILE__), '..', 'views')
+ if public_methods.include?('append_view_path')
+ self.append_view_path view_path
+ elsif public_methods.include?("view_paths")
+ self.view_paths << view_path
+ else
+ self.template_root = view_path
end
end \ No newline at end of file