flexoid/depot — comment on commit fc15f835be435e4d27977856c8661106a5c07819
File: app/models/product.rb line 25
By flexoid:

,
false before_destroy.
false.
:

if line_items.any?
errors.add(:base, 'Line items with this product present')
false
end

false , ,
errors.

24 2012 . 11:12 gotva <
reply@reply.github.com
> :

> , ...
> errors (return true/false
> )
>
> errors.add(:base, 'Line Items present') if line_items.any?
>
>
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/flexoid/depot/commit/fc15f835be435e4d27977856c8661106a5c07819#commitcomment-1006312
>