blank? -> present?

Albert Sun 11 年之前
父節點
當前提交
18595b0760
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/models/agents/website_agent.rb

+ 1 - 1
app/models/agents/website_agent.rb

@@ -73,7 +73,7 @@ module Agents
73 73
       hydra = Typhoeus::Hydra.new
74 74
       log "Fetching #{options['url']}"
75 75
       request_opts = {:followlocation => true}
76
-      if !options['basic_auth'].blank?
76
+      if options['basic_auth'].present?
77 77
         request_opts[:userpwd] = options['basic_auth']
78 78
       end
79 79
       request = Typhoeus::Request.new(options['url'], request_opts)