Sha256: 8c5ec58e46812af0653a14524393111fca091c1f3e4f9cdce0367b65b741ccfa

Contents?: true

Size: 471 Bytes

Versions: 9

Compression:

Stored size: 471 Bytes

Contents

module Logistics
  module Core
    class ReviewNote < ApplicationRecord
      belongs_to :correspondence, polymorphic: true

      def to_json
        JSON.parse(
            Jbuilder.encode do |json|
              json.id self.id
              json.note self.note
            end
        )
      end

      def change_to_hash(items)
        data = []
        items.each { |item|
          data.push item.to_json
        }
        return data
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 app/models/logistics/core/review_note.rb
logistics_core-21.11.1 app/models/logistics/core/review_note.rb
logistics_core-21.08.1 app/models/logistics/core/review_note.rb
logistics_core-21.03.1 app/models/logistics/core/review_note.rb
logistics_core-20.10.3 app/models/logistics/core/review_note.rb
logistics_core-20.10.2 app/models/logistics/core/review_note.rb
logistics_core-20.10.1 app/models/logistics/core/review_note.rb
logistics_core-20.9.1 app/models/logistics/core/review_note.rb
logistics_core-20.8.1 app/models/logistics/core/review_note.rb