Skip to content

Commit

Permalink
Remove Rectify Overrides as they are not required anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu committed Mar 22, 2022
1 parent d138984 commit e6e4a38
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 43 deletions.
22 changes: 22 additions & 0 deletions decidim-core/lib/decidim/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,27 @@

module Decidim
class Command < Rectify::Command
def self.call(*args, **kwargs, &block)
event_recorder = Rectify::EventRecorder.new

command = new(*args, **kwargs)
command.subscribe(event_recorder)
command.evaluate(&block) if block_given?
command.call

event_recorder.events
end

def method_missing(method_name, ...)
if @caller.respond_to?(method_name, true)
@caller.send(method_name, ...)
else
super
end
end

def respond_to_missing?(method_name, include_private = false)
@caller.respond_to?(method_name, include_private)
end
end
end
1 change: 0 additions & 1 deletion decidim-core/lib/decidim/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require "decidim/core/engine"
require "decidim/core/api"
require "decidim/core/version"
require_relative "../gem_overrides/rectify/command"

# Decidim configuration.
module Decidim
Expand Down
42 changes: 0 additions & 42 deletions decidim-core/lib/gem_overrides/rectify/command.rb

This file was deleted.

0 comments on commit e6e4a38

Please sign in to comment.