Sha256: 8e28e93f3518bfb3017dc987298f80bd48edd72a54cedcbf26e394450e10e0c6

Contents?: true

Size: 495 Bytes

Versions: 3

Compression:

Stored size: 495 Bytes

Contents

module ForestLiana
  class ActionsController < ForestLiana::ApplicationController
    after_action :log_activities

    def log_activities
      params[:data][:attributes][:ids].each do |record_id|
        collection = params[:data][:attributes][:collection_name]
        action_name = "triggered the action \"#{params[:action].capitalize}\""
        ActivityLogger.new.perform(current_user, action_name, collection,
                            record_id)
      end
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
forest_liana-1.3.23 app/controllers/forest_liana/actions_controller.rb
forest_liana-1.3.22 app/controllers/forest_liana/actions_controller.rb
forest_liana-1.3.21 app/controllers/forest_liana/actions_controller.rb