module ErpBaseErpSvcs::Extensions::ActiveRecord::ActsAsErpType::ActsAsInstanceMethods
Adds instance methods.
Public Instance Methods
to_data_hash()
click to toggle source
# File lib/erp_base_erp_svcs/extensions/active_record/acts_as_erp_type.rb, line 169 def to_data_hash to_hash(only: [:id, :description, :internal_identifier, :created_at, :updated_at]) end
to_label()
click to toggle source
Alias for to_s
# File lib/erp_base_erp_svcs/extensions/active_record/acts_as_erp_type.rb, line 165 def to_label to_s end
to_s()
click to toggle source
# File lib/erp_base_erp_svcs/extensions/active_record/acts_as_erp_type.rb, line 160 def to_s self.try(:description) ? self.try(:description) : self.try(:id) end