2011-05-07 21:55:24 +02:00
|
|
|
class OrderComment < ActiveRecord::Base
|
|
|
|
|
|
|
|
belongs_to :order
|
|
|
|
belongs_to :user
|
|
|
|
|
|
|
|
validates_presence_of :order_id, :user_id, :text
|
2011-06-19 20:47:27 +02:00
|
|
|
validates_length_of :text, :minimum => 3
|
2011-05-07 21:55:24 +02:00
|
|
|
end
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: order_comments
|
|
|
|
#
|
2011-05-07 21:55:24 +02:00
|
|
|
# id :integer(4) not null, primary key
|
|
|
|
# order_id :integer(4)
|
|
|
|
# user_id :integer(4)
|
2009-01-29 01:57:51 +01:00
|
|
|
# text :text
|
|
|
|
# created_at :datetime
|
|
|
|
#
|
|
|
|
|