summaryrefslogtreecommitdiffstats
path: root/lib/sms_notifier.rb
diff options
context:
space:
mode:
authorBrendan G. Lim2008-06-19 02:17:08 -0400
committerBrendan G. Lim2008-06-19 02:17:08 -0400
commitf1026d0aca169caf57dd44e57661177bd66e2e37 (patch)
tree58be0543dfe6342583f7d20c61373f7609f02d1e /lib/sms_notifier.rb
parentde241d15bfa878f600a462f49b4fd3c92285c3ab (diff)
downloadsms-fu-f1026d0aca169caf57dd44e57661177bd66e2e37.tar.bz2
Updating to be compatibile with Rails 2.1
Diffstat (limited to 'lib/sms_notifier.rb')
-rw-r--r--lib/sms_notifier.rb9
1 files changed, 7 insertions, 2 deletions
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