Skip to content

Commit

Permalink
Move after_action to the concern
Browse files Browse the repository at this point in the history
This fixes failing specs on production in which `after_action` callback seems to be executed after tables are truncated.
  • Loading branch information
Lubosky committed Aug 1, 2023
1 parent a252017 commit 46506ac
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/controllers/admin/press_summaries_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
class Admin::PressSummariesController < Admin::BaseController
after_action :log_event, only: [:create, :update, :submit, :signoff]
include PressSummaryMixin
end
1 change: 0 additions & 1 deletion app/controllers/assessor/press_summaries_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
class Assessor::PressSummariesController < Assessor::BaseController
after_action :log_event, only: [:create, :update, :submit, :signoff]
include PressSummaryMixin
end
1 change: 1 addition & 0 deletions app/controllers/concerns/press_summary_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module PressSummaryMixin
def self.included(base)
base.before_action :load_form_answer
base.before_action :load_press_summary, except: :create
base.after_action :log_event, only: [:create, :update, :submit, :signoff]
end

def create
Expand Down

0 comments on commit 46506ac

Please sign in to comment.