Sha256: 15ad997e3049b24f895e7ca901044673e230c5fec2411186a2c96599f2aa86f2

Contents?: true

Size: 812 Bytes

Versions: 24

Compression:

Stored size: 812 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
  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
#  updated_at              :datetime
#  error_message           :text
#

Version data entries

24 entries across 23 versions & 2 rubygems

Version Path
enju_biblio-0.2.5 app/models/resource_import_result.rb
enju_biblio-0.2.4 app/models/resource_import_result.rb
enju_biblio-0.2.3 app/models/resource_import_result.rb
enju_biblio-0.2.2 app/models/resource_import_result.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.1/app/models/resource_import_result.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.0/app/models/resource_import_result.rb
enju_biblio-0.2.1 app/models/resource_import_result.rb
enju_biblio-0.2.0 app/models/resource_import_result.rb
enju_biblio-0.2.0.beta.4 app/models/resource_import_result.rb
enju_biblio-0.2.0.beta.3 app/models/resource_import_result.rb
enju_biblio-0.2.0.beta.2 app/models/resource_import_result.rb
enju_biblio-0.2.0.beta.1 app/models/resource_import_result.rb
enju_biblio-0.1.3 app/models/resource_import_result.rb
enju_biblio-0.1.2 app/models/resource_import_result.rb
enju_biblio-0.1.1 app/models/resource_import_result.rb
enju_biblio-0.1.0 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre71 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre70 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre69 app/models/resource_import_result.rb
enju_biblio-0.1.0.pre68 app/models/resource_import_result.rb