use english locale
This commit is contained in:
parent
eda0d86e74
commit
ec36ac619f
3 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ class Order < ActiveRecord::Base
|
|||
|
||||
def to_sentence
|
||||
self.order_items.map {
|
||||
|oi| oi.count.to_s + " " + oi.product.name.pluralize(oi.count, :nl)
|
||||
|oi| pluralize(oi.count, oi.product.name)
|
||||
}.to_sentence
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class OrderItem < ActiveRecord::Base
|
|||
belongs_to :product
|
||||
|
||||
validates :product, presence: true
|
||||
validates :count, numericality: { only_integer: true, greater_than_or_equal_to: 0, smaller_than_or_equal_to: 10000 }
|
||||
validates :count, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
||||
|
||||
after_create :remove_from_stock
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<br/>
|
||||
Specifics:<br/>
|
||||
<ul>
|
||||
<%= @products.map{ |p| content_tag(:li, p.count.to_s + " " + p.name.pluralize(p.count, :nl)) }.join("\n").html_safe %>
|
||||
<%= @products.map{ |p| content_tag(:li, pluralize(p.count, p.name)) }.join("\n").html_safe %>
|
||||
</ul>
|
||||
|
||||
<h4>All orders (<%= @user.orders_count %>)</h4>
|
||||
|
|
Loading…
Reference in a new issue