Ups! I forgot to remove that :P.

I'll make a commit right now. Thanks!

El 08/07/13 20:04, Imanol Alvarez Perez escribió:
> In app/models/line.rb:
> 
>> +
>> +  fields do
>> +    name  :string
>> +    price :decimal, :precision => 8, :scale => 2, :default => 0
>> +    amount :integer, :default => 1
>> +    timestamps
>> +  end
>> +  attr_accessible :name, :price, :product, :sale, :product_id, :sale_id, :amount
>> +  
>> +  belongs_to :sale
>> +  belongs_to :product
>> +
>> +  validates_presence_of :sale, :product
>> +  validate :only_one_line_per_sale
>> +  def only_one_line_per_sale
>> +  end
> 
> What is this?!
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/suyccom/yousell/pull/5/files#r5071458>.
> 

-- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre