Sha256: fe500ccdff7cd5e3992972ea55148b4a9f042a4a97b355feefc539d599456648

Contents?: true

Size: 628 Bytes

Versions: 5

Compression:

Stored size: 628 Bytes

Contents

class AgentImportResult < ActiveRecord::Base
  default_scope { order('agent_import_results.id') }
  scope :file_id, proc{|file_id| where(agent_import_file_id: file_id)}
  scope :failed, -> { where(agent_id: nil) }

  belongs_to :agent_import_file
  belongs_to :agent, optional: true

  validates_presence_of :agent_import_file_id
end

# == Schema Information
#
# Table name: agent_import_results
#
#  id                   :integer          not null, primary key
#  agent_import_file_id :integer
#  agent_id             :integer
#  body                 :text
#  created_at           :datetime
#  updated_at           :datetime
#

Version data entries

5 entries across 5 versions & 1 rubygems

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