Removed acts_as_paranoid. Implemented own version.

This commit is contained in:
Benjamin Meichsner 2013-03-16 17:53:24 +01:00
parent 8bafb3f4b2
commit 07581b7ecf
25 changed files with 93 additions and 57 deletions

View file

@ -1,4 +1,4 @@
- title "Artikel von #{@supplier.name} (#{@supplier.articles.count})"
- title "Artikel von #{@supplier.name} (#{@supplier.articles.undeleted.count})"
.well.well-small
.btn-toolbar
@ -28,7 +28,7 @@
Lieferant wechseln ..
%span.caret
%ul.dropdown-menu
- Supplier.where('id != ?', @supplier.id).order('name ASC').each do |supplier|
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
%li= link_to supplier.name, supplier_articles_path(supplier), tabindex: -1
- unless @supplier.shared_supplier.nil?

View file

@ -41,7 +41,7 @@
#recipients
= f.input :recipient_tokens, :input_html => { 'data-pre' => User.find_all_by_id(@message.recipients_ids).map { |u| u.token_attributes }.to_json }
= f.input :group_id, :as => :select, :collection => Group.order('type DESC, name ASC').all.reject { |g| g.memberships.empty? }
= f.input :group_id, :as => :select, :collection => Group.undeleted.order('type DESC, name ASC').all.reject { |g| g.memberships.empty? }
= f.input :private
= f.input :subject, input_html: {class: 'input-xxlarge'}
= f.input :body, input_html: {class: 'input-xxlarge'}

View file

@ -6,7 +6,7 @@
Neue Bestellung anlegen
%span.caret
%ul.dropdown-menu
- Supplier.all.each do |supplier|
- Supplier.undeleted.order('suppliers.name ASC').each do |supplier|
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
.well

View file

@ -18,8 +18,8 @@
%td= link_to h(supplier.name) , supplier
%td= supplier.phone
%td= supplier.customer_number
%td= link_to "Artikel (#{supplier.articles.count})", supplier_articles_path(supplier)
%td= link_to "im Lager (#{supplier.stock_articles.count})", stock_articles_path
%td= link_to "Artikel (#{supplier.articles.undeleted.count})", supplier_articles_path(supplier)
%td= link_to "im Lager (#{supplier.stock_articles.undeleted.count})", stock_articles_path
%td= link_to "Lieferungen (#{supplier.deliveries.count})", supplier_deliveries_path(supplier)
%td
= link_to "Bearbeiten", edit_supplier_path(supplier), class: 'btn btn-mini'