Sha256: 533ec104f5bdc31ff4a4193703788a703dd4ee020aa20193e94f807ca8548d15

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

class AnswerHasItem < ActiveRecord::Base
  attr_accessible :answer_id, :item_id
  belongs_to :answer
  belongs_to :item

  validates_uniqueness_of :item_id, scope: :answer_id
  acts_as_list scope: :answer_id
end

# == Schema Information
#
# Table name: answer_has_items
#
#  id         :integer          not null, primary key
#  answer_id  :integer
#  item_id    :integer
#  position   :integer
#  created_at :datetime         not null
#  updated_at :datetime         not null
#

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_question-0.1.0.pre13 app/models/answer_has_item.rb
enju_question-0.1.0.pre12 app/models/answer_has_item.rb