diff options
author | Hans de Graaff <hans@degraaff.org> | 2024-01-02 13:04:10 +0100 |
---|---|---|
committer | Hans de Graaff <hans@degraaff.org> | 2024-01-02 13:04:10 +0100 |
commit | d958f28ef4c28b06244e020e50ca0d6234182547 (patch) | |
tree | b662ec72dedd6267ff7ff8e0e586c862ebc0a71b /dev-ruby | |
parent | dev-ruby/draper: apply fix for view context issues (diff) | |
download | graaff-d958f28ef4c28b06244e020e50ca0d6234182547.tar.gz graaff-d958f28ef4c28b06244e020e50ca0d6234182547.tar.bz2 graaff-d958f28ef4c28b06244e020e50ca0d6234182547.zip |
dev-ruby/draper: remove unused patch
Signed-off-by: Hans de Graaff <hans@degraaff.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/draper/files/draper-2.1.0-rails-runner.patch | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/dev-ruby/draper/files/draper-2.1.0-rails-runner.patch b/dev-ruby/draper/files/draper-2.1.0-rails-runner.patch deleted file mode 100644 index 5a30dd96..00000000 --- a/dev-ruby/draper/files/draper-2.1.0-rails-runner.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit bc72bd876ea5ba3d54a21b155f29c9641d2e6ffa -Author: Hans de Graaff <hans@winkwaves.com> -Date: Tue Apr 19 13:22:00 2016 +0200 - - Also initialize ViewContext for rails runner - - Initialize Draper's ViewContext when using the runner command in a - similar way to using the console command. Without this code run by the - rails runner command (e.g. when processing commands from a message - queue) will not have a properly initialized ViewContext, and - consequently the helpers will not be initialized. - -diff --git a/lib/draper/railtie.rb b/lib/draper/railtie.rb -index e75bda3..ebceec7 100755 ---- a/lib/draper/railtie.rb -+++ b/lib/draper/railtie.rb -@@ -63,6 +63,12 @@ module Draper - Draper::ViewContext.build - end - -+ runner do -+ require 'action_controller/test_case' -+ ApplicationController.new.view_context -+ Draper::ViewContext.build -+ end -+ - rake_tasks do - Dir[File.join(File.dirname(__FILE__),'tasks/*.rake')].each { |f| load f } - end |