Sha256: e53867b16d31bb3bcb730094f019774d72d2ed2894b10e3058d3cb6315ffe3b3
Contents?: true
Size: 863 Bytes
Versions: 14
Compression:
Stored size: 863 Bytes
Contents
module CsvRowModel module Import class File module Validations extend ActiveSupport::Concern included do include ActiveModel::Validations include Validators::ValidateAttributes validate_attributes :csv end # @return [Boolean] returns true, if the file should abort reading def abort? !valid? || !!current_row_model.try(:abort?) end # @return [Boolean] returns true, if the file should skip `current_row_model` def skip? !!current_row_model.try(:skip?) end protected def _abort? abort = abort? run_callbacks(:abort) if abort abort end def _skip? skip = skip? run_callbacks(:skip) if skip skip end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems