move include ::ActionView::Helpers::NumberHelper to Invoice::DataPresenter::Base

This commit is contained in:
Mohamed ABDELLANI
2023-07-14 23:52:57 +01:00
parent aa4798d35c
commit 7eabb9a170
4 changed files with 2 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
class Invoice
class DataPresenter
include ::ActionView::Helpers::NumberHelper
attr_reader :invoice
delegate :data, to: :invoice

View File

@@ -3,7 +3,6 @@
class Invoice
class DataPresenter
class Adjustment < Invoice::DataPresenter::Base
include ::ActionView::Helpers::NumberHelper
attributes :additional_tax_total, :adjustable_type, :amount, :currency, :included_tax_total,
:label
array_attribute :tax_rates, class_name: 'TaxRate'

View File

@@ -3,6 +3,7 @@
class Invoice
class DataPresenter
class Base
include ::ActionView::Helpers::NumberHelper
attr_reader :data
def initialize(data)

View File

@@ -3,7 +3,6 @@
class Invoice
class DataPresenter
class LineItem < Invoice::DataPresenter::Base
include ::ActionView::Helpers::NumberHelper
attributes :added_tax, :currency, :included_tax, :price_with_adjustments, :quantity,
:variant_id
attributes_with_presenter :variant