Skip to content

Commit f7fb87b

Browse files
author
David Rodríguez
committed
Fix another warning
``` warning: instance variable @_simple_captcha_result not initialized ```
1 parent 81b7508 commit f7fb87b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/simple_captcha/controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module ControllerHelpers #:nodoc
1515
# end
1616
def simple_captcha_valid?
1717
return true if SimpleCaptcha.always_pass
18-
return @_simple_captcha_result unless @_simple_captcha_result.nil?
18+
return @_simple_captcha_result unless !defined?(@_simple_captcha_result) || @_simple_captcha_result.nil?
1919

2020
if params[:captcha]
2121
captcha_key = params[:captcha_key] || session[:captcha]

0 commit comments

Comments
 (0)