Sha256: 065af8d6f99522023b7ac93fa724203ac9e6bcce45232e11aaa6c3efaf323f55

Contents?: true

Size: 684 Bytes

Versions: 16

Compression:

Stored size: 684 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Plans
    module PaperTrail
      module RecordTrail
        # Saves associations if
        # a) The version record responds to `track_associations?` and returns
        #    `true` from it.
        # b) `PaperTrail.config.track_associations` is set to `true`.
        def save_associations(version)
          if version.respond_to?(:track_associations?)
            return unless version.track_associations?
          else
            return unless ::PaperTrail.config.track_associations?
          end

          save_bt_associations(version)
          save_habtm_associations(version)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
decidim-plans-0.18.2 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.18.1 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.18.0 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.17.0 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.9 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.8 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.7 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.6 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.5 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.4 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.3 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.2 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.1 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.16.0 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.15.1 lib/decidim/plans/paper_trail/record_trail.rb
decidim-plans-0.15.0 lib/decidim/plans/paper_trail/record_trail.rb