diff options
| author | Brendan G. Lim | 2008-06-19 02:17:08 -0400 | 
|---|---|---|
| committer | Brendan G. Lim | 2008-06-19 02:17:08 -0400 | 
| commit | f1026d0aca169caf57dd44e57661177bd66e2e37 (patch) | |
| tree | 58be0543dfe6342583f7d20c61373f7609f02d1e /lib | |
| parent | de241d15bfa878f600a462f49b4fd3c92285c3ab (diff) | |
| download | sms-fu-f1026d0aca169caf57dd44e57661177bd66e2e37.tar.bz2 | |
Updating to be compatibile with Rails 2.1
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sms_fu.rb | 1 | ||||
| -rw-r--r-- | lib/sms_notifier.rb | 9 | 
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 | 
