Sha256: cf18d3834f597d2d7b11e2c7aa1b0b4fffa1cee5956f50571af9db3bfe38a0ef

Contents?: true

Size: 844 Bytes

Versions: 5

Compression:

Stored size: 844 Bytes

Contents

class ResourceImportResult < ActiveRecord::Base
  default_scope { order('resource_import_results.id') }
  scope :file_id, proc{|file_id| where(resource_import_file_id: file_id)}
  scope :failed, -> { where(manifestation_id: nil) }
  scope :skipped, -> { where('error_message IS NOT NULL') }

  belongs_to :resource_import_file
  belongs_to :manifestation, optional: true
  belongs_to :item, optional: true

  validates_presence_of :resource_import_file_id
end

# == Schema Information
#
# Table name: resource_import_results
#
#  id                      :integer          not null, primary key
#  resource_import_file_id :integer
#  manifestation_id        :integer
#  item_id                 :integer
#  body                    :text
#  created_at              :datetime
#  updated_at              :datetime
#  error_message           :text
#

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_biblio-0.3.2 app/models/resource_import_result.rb
enju_biblio-0.3.1 app/models/resource_import_result.rb
enju_biblio-0.3.0 app/models/resource_import_result.rb
enju_biblio-0.3.0.rc.1 app/models/resource_import_result.rb
enju_biblio-0.3.0.beta.2 app/models/resource_import_result.rb