Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init file add defined?()

  • Loading branch information...
commit eac84789478d1dce5a22b96f3768f8d43d66ee79 1 parent 017659d
vkill authored
2  lib/generators/youdao_fanyi/install/templates/youdao_fanyi.rb
View
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.