Advertisement
Guest User

Untitled

a guest
May 30th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # app/models/concerns/states.rb
  2. module States
  3. extend ActiveSupport::Concern
  4. included do
  5. enum state: [ :in_process, :processing, :processed, :failed_processing, :verified ,:deleted, :invalid_file, :sent_to_api ]
  6. end
  7. end
  8.  
  9. # app/models/input_tracker.rb
  10. class InputTracker < ApplicationRecord
  11. has_one :output_tracker
  12. include States
  13. end
  14.  
  15. # app/models/output_tracker.rb
  16. class OutputTracker < ApplicationRecord
  17. belongs_to :input_tracker
  18. include States
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement