diff --git a/app/models/m_odr_file.rb b/app/models/m_odr_file.rb index 8235c16..251eba2 100644 --- a/app/models/m_odr_file.rb +++ b/app/models/m_odr_file.rb @@ -7,10 +7,10 @@ class MOdrFile < ApplicationRecord has_many :mail_hists - has_many :m_odr_file_products + has_many :m_odr_file_products, :dependent => :destroy accepts_nested_attributes_for :m_odr_file_products, :allow_destroy => true - has_many :m_odr_file_roulages + has_many :m_odr_file_roulages, :dependent => :destroy accepts_nested_attributes_for :m_odr_file_roulages, :allow_destroy => true @@ -113,7 +113,7 @@ class MOdrFile < ApplicationRecord :nbr_pneus_not_useds => {:name => "Nbr pneus restants", :reorder => true}, :nbr_primes => {:name => "Nbr primes", :reorder => true}, :nbr_primes_useds => {:name => "Nbr primes utilisés", :reorder => true}, - :nbr_primes_not_useds => {:name => "Nbr primes restants", :reorder => true}, + :nbr_primes_not_useds => {:name => "Nbr primes restantes", :reorder => true}, :actions => {:name => "Actions", :reorder => true}, diff --git a/app/views/admin/m_odr_files/_m_odr_file.html.haml b/app/views/admin/m_odr_files/_m_odr_file.html.haml index 88ef794..037e695 100644 --- a/app/views/admin/m_odr_files/_m_odr_file.html.haml +++ b/app/views/admin/m_odr_files/_m_odr_file.html.haml @@ -35,7 +35,7 @@ -tr[:actions] = capture do %td.actions - = link_to i(:"trash-o"), [:admin, m_odr_file], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => false + = link_to i(:"trash-o"), [:admin, m_odr_file], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true = link_to i(:pencil), edit_admin_m_odr_file_path(m_odr_file), :remote => false = link_to i(:eye), admin_m_odr_file_path(m_odr_file), :remote => false diff --git a/app/views/admin/m_odr_files/show.html.haml b/app/views/admin/m_odr_files/show.html.haml index afde719..5dfebf9 100644 --- a/app/views/admin/m_odr_files/show.html.haml +++ b/app/views/admin/m_odr_files/show.html.haml @@ -48,11 +48,11 @@ -@m_odr_file.m_odr_file_products.each do |m_odr_file_product| %tr %td - =m_odr_file_product.m_odr_product_size.name + =m_odr_file_product.m_odr_product_size.name if m_odr_file_product.m_odr_product_size %td =m_odr_file_product.qte %td - =number_to_currency m_odr_file_product.price + =number_to_currency m_odr_file_product.price if m_odr_file_product.m_odr_product_size -else