Remove useless upper bound of 99 items #388
This commit is contained in:
parent
a97eee68b1
commit
53b51f0f5c
2 changed files with 2 additions and 9 deletions
|
@ -8,9 +8,6 @@ class GroupOrderArticle < ActiveRecord::Base
|
||||||
has_many :group_order_article_quantities, :dependent => :destroy
|
has_many :group_order_article_quantities, :dependent => :destroy
|
||||||
|
|
||||||
validates_presence_of :group_order, :order_article
|
validates_presence_of :group_order, :order_article
|
||||||
validates_inclusion_of :quantity, :in => 0..99
|
|
||||||
validates_inclusion_of :result, :in => 0..99, :allow_nil => true
|
|
||||||
validates_inclusion_of :tolerance, :in => 0..99
|
|
||||||
validates_uniqueness_of :order_article_id, :scope => :group_order_id # just once an article per group order
|
validates_uniqueness_of :order_article_id, :scope => :group_order_id # just once an article per group order
|
||||||
|
|
||||||
scope :ordered, -> { includes(:group_order => :ordergroup).order('groups.name') }
|
scope :ordered, -> { includes(:group_order => :ordergroup).order('groups.name') }
|
||||||
|
|
|
@ -6,8 +6,4 @@ class GroupOrderArticleQuantity < ActiveRecord::Base
|
||||||
belongs_to :group_order_article
|
belongs_to :group_order_article
|
||||||
|
|
||||||
validates_presence_of :group_order_article_id
|
validates_presence_of :group_order_article_id
|
||||||
validates_inclusion_of :quantity, :in => 0..99
|
|
||||||
validates_inclusion_of :tolerance, :in => 0..99
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue