Sha256: da9e8c66d24058c69a2bae1a7dbf15fdab19e7021c58fd4eaf79d5cf3012890e

Contents?: true

Size: 925 Bytes

Versions: 4

Compression:

Stored size: 925 Bytes

Contents

class ResourceImportResult < ActiveRecord::Base
  attr_accessible :resource_import_file_id, :manifestation_id, :item_id, :body
  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
  belongs_to :item

  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         not null
#  updated_at              :datetime         not null
#  error_message           :text
#

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
enju_biblio-0.1.0.pre62 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre61 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre60 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre59 app/models/resource_import_result.rb