summaryrefslogtreecommitdiffstats
path: root/lib/sms_fu
diff options
context:
space:
mode:
authorDingding Ye2011-06-01 16:27:41 +0800
committerDingding Ye2011-06-01 16:27:41 +0800
commit608fc07d30ca2f0d7b8554aaec1fa2a63b90f2a7 (patch)
treea17716aad2e85ab7dbe9a13dc24afbd634e58872 /lib/sms_fu
parentce2dafa35550f1667ef5601111df02d42c88ec50 (diff)
downloadsms-fu-608fc07d30ca2f0d7b8554aaec1fa2a63b90f2a7.tar.bz2
user Rails.root instead of RAILS_ROOT
Diffstat (limited to 'lib/sms_fu')
-rw-r--r--lib/sms_fu/sms_fu.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sms_fu/sms_fu.rb b/lib/sms_fu/sms_fu.rb
index a65f419..26b8649 100644
--- a/lib/sms_fu/sms_fu.rb
+++ b/lib/sms_fu/sms_fu.rb
@@ -99,8 +99,8 @@ module SMSFu
end
def template_directory
- directory = defined?(Rails) ? "#{RAILS_ROOT}/config" : "#{File.dirname(__FILE__)}/../../templates"
- if (defined?(Rails) && Rails.env == 'test') || (defined?(RAILS_ENV) && RAILS_ENV == 'test)')
+ directory = defined?(Rails) ? "#{Rails.root}/config" : "#{File.dirname(__FILE__)}/../../templates"
+ if (defined?(Rails) && Rails.env == 'test')
"#{File.dirname(__FILE__)}/../../templates"
else
directory
@@ -109,4 +109,4 @@ module SMSFu
end
end
-class SMSFuException < StandardError; end \ No newline at end of file
+class SMSFuException < StandardError; end