From 47c5edf2545d623df9585313658268312d81920b Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 9 Mar 2017 10:17:30 +0800 Subject: [PATCH] Mount engine use `prepend` method to get high priority in routes. --- lib/rucaptcha/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rucaptcha/engine.rb b/lib/rucaptcha/engine.rb index 1041af3..7b4e51e 100644 --- a/lib/rucaptcha/engine.rb +++ b/lib/rucaptcha/engine.rb @@ -4,8 +4,8 @@ module RuCaptcha initializer 'rucaptcha.init' do |app| # https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/routing/route_set.rb#L268 - # `app.routes.append` start from Rails 3.2 - 5.0 - app.routes.append do + # `app.routes.prepend` start from Rails 3.2 - 5.0 + app.routes.prepend do mount RuCaptcha::Engine => '/rucaptcha' end