Created
August 5, 2019 09:54
-
-
Save edlvj/0c88fa78ba4d5146aa0dc587b4dbde39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Copyright (c) 2017-2019 SwiftComply | |
module InspectionActivity | |
extend ActiveSupport::Concern | |
def inspection_activity_params | |
inspection_activity_params = activity_params.dup | |
inspection_activity_params.merge(action: inspection_activity_action) | |
end | |
private | |
def inspection_activity_action | |
return 're_opened' if params[:action] == 'open' | |
return unless params[:commit] | |
'closed' if params[:commit] == 'close' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment