Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # app/models/concerns/states.rb
- module States
- extend ActiveSupport::Concern
- included do
- enum state: [ :in_process, :processing, :processed, :failed_processing, :verified ,:deleted, :invalid_file, :sent_to_api ]
- end
- end
- # app/models/input_tracker.rb
- class InputTracker < ApplicationRecord
- has_one :output_tracker
- include States
- end
- # app/models/output_tracker.rb
- class OutputTracker < ApplicationRecord
- belongs_to :input_tracker
- include States
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement