Fix session.id call in Rails 3.2 (#36)

This commit is contained in:
koali-fang 2016-12-01 18:00:38 +08:00 committed by Jason Lee
parent 107339ea9e
commit 45a9056cf4
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ module RuCaptcha
# session key of rucaptcha # session key of rucaptcha
def rucaptcha_sesion_key_key def rucaptcha_sesion_key_key
['rucaptcha-session', session.id].join(':') session_id = session.respond_to?(:id) ? session.id : session[:session_id]
['rucaptcha-session', session_id].join(':')
end end
# Generate a new Captcha # Generate a new Captcha