Sha256: 776c456b57fe3c71741d8d393e18048abc481a0831385afc716252b93fbbeda8

Contents?: true

Size: 505 Bytes

Versions: 10

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

module ActionTracker
  module Templates
    class Update < BaseTemplate
      def event_name
        'Updated'
      end

      def content
        @content ||= ModelAuditor::Changes.new(inspectable, changes).filter(skipped_attributes).audit
      end

      private

      def inspectable
        options[:reference] || target
      end

      def changes
        options[:changes]
      end

      def skipped_attributes
        options[:skip]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
action_tracker_client-0.1.8 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.7 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.6 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.5 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.4 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.3 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.2 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.1 lib/action_tracker/templates/update.rb
action_tracker_client-0.1.0 lib/action_tracker/templates/update.rb
action_tracker_client-0.0.1 lib/action_tracker/templates/update.rb