Merge branch 'tests-rspec' into master-spec

This commit is contained in:
wvengen 2013-09-10 11:37:05 +02:00
commit e20898c5ee
28 changed files with 786 additions and 13 deletions

View file

@ -13,11 +13,9 @@ class Supplier < ActiveRecord::Base
:delivery_days, :order_howto, :note, :shared_supplier_id, :min_order_quantity
validates :name, :presence => true, :length => { :in => 4..30 }
validates :phone, :presence => true, :length => { :in => 8..20 }
validates :phone, :presence => true, :length => { :in => 8..25 }
validates :address, :presence => true, :length => { :in => 8..50 }
validates_length_of :order_howto, :note, maximum: 250
validates_length_of :phone, :in => 8..20
validates_length_of :address, :in => 8..50
validate :uniqueness_of_name
scope :undeleted, -> { where(deleted_at: nil) }

View file

@ -12,7 +12,7 @@
.well.well-small
%h3= t('.notes_and_journal')
#note
- unless @order.note.empty?
- unless @order.note.blank?
= simple_format @order.note
- else
%p= t('.comment_on_transaction')