Sha256: d00adb9fc648e1e83664b436e556bcd48b55f14bd3f5a02d39a141e20cf00ddd

Contents?: true

Size: 491 Bytes

Versions: 5

Compression:

Stored size: 491 Bytes

Contents

module Imports
  module Mappings
    class Base
      extend ActiveSupport::Concern

      def add_unmapped_importable_columns(mapper)
        remaining_columns = self.class.importable_columns.except(*mapper.input_columns)
        remaining_columns.each do |column, target_field|
          mapper.optional_mapping(column, target_field)
        end
      end

      module ClassMethod
        def importable_columns
          raise NotImplementedError
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
topographer-0.0.9 lib/topographer/generators/templates/rails_mapping_base.rb.erb
topographer-0.0.8 lib/topographer/generators/templates/rails_mapping_base.rb.erb
topographer-0.0.7 lib/topographer/generators/templates/rails_mapping_base.rb.erb
topographer-0.0.6 lib/topographer/generators/templates/rails_mapping_base.rb.erb
topographer-0.0.5 lib/topographer/generators/templates/rails_mapping_base.rb.erb