Browse files

init file add defined?()

  • Loading branch information...
1 parent 017659d commit eac84789478d1dce5a22b96f3768f8d43d66ee79 @vkill committed Dec 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/generators/youdao_fanyi/install/templates/youdao_fanyi.rb
View
2 lib/generators/youdao_fanyi/install/templates/youdao_fanyi.rb
@@ -1,4 +1,4 @@
-if Rails.env.development?
+if Rails.env.development? and defined?(YoudaoFanyi)
YoudaoFanyi.configure do |config|
config.api_keys = YAML.load_file(Rails.root.join("config/youdao_fanyi_api_keys.yml").to_s)["youdao_fanyi_api_keys"]
# config.http_proxy = 'http://127.0.0.1:8118'

0 comments on commit eac8478

Please sign in to comment.