From 771b7afaa00efb62a16693403f3314ae1c0429e2 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Sat, 4 Feb 2017 21:47:13 +0800 Subject: [PATCH] Fix `/rucaptcha` path issue when `config.action_controller.asset_host` has setup with CDN url. close ruby-china/homeland/pull/856 fix #39 --- CHANGELOG.md | 5 +++++ Gemfile.lock | 2 +- lib/rucaptcha/version.rb | 2 +- lib/rucaptcha/view_helpers.rb | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe0346..ee90f1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +2.0.1 +----- + +- Fix `/rucaptcha` path issue when `config.action_controller.asset_host` has setup with CDN url. + 2.0.0 ----- diff --git a/Gemfile.lock b/Gemfile.lock index 80834f9..4fc4c84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rucaptcha (2.0.0) + rucaptcha (2.0.1) railties (>= 3.2) GEM diff --git a/lib/rucaptcha/version.rb b/lib/rucaptcha/version.rb index 78d10e8..d6d2ef5 100644 --- a/lib/rucaptcha/version.rb +++ b/lib/rucaptcha/version.rb @@ -1,3 +1,3 @@ module RuCaptcha - VERSION = '2.0.0' + VERSION = '2.0.1' end diff --git a/lib/rucaptcha/view_helpers.rb b/lib/rucaptcha/view_helpers.rb index a979654..7a5cec2 100644 --- a/lib/rucaptcha/view_helpers.rb +++ b/lib/rucaptcha/view_helpers.rb @@ -13,7 +13,7 @@ module RuCaptcha def rucaptcha_image_tag(opts = {}) opts[:class] = opts[:class] || 'rucaptcha-image' - image_tag(ru_captcha.root_path, opts) + image_tag(ru_captcha.root_url, opts) end end end