Guest User

Untitled

a guest
Mar 13th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. class PurchaseOrderItem < ActiveRecord::Base
  2.  
  3. # -- other stuff --
  4.  
  5. Status_Not_Ordered = 1
  6. @@statuses = {Status_Not_Ordered => 'Not Ordered', 2=>'Ordered', 3=>'Backordered', 4=>'Cancelled', 5=> 'Other (see notes)'}
  7. # -- other stuff --
  8.  
  9. end
  10.  
  11.  
  12. Now in IRB:
  13.  
  14.  
  15. >> PuchaseOrderItem.Status_Not_Ordered
  16. NameError: uninitialized constant PuchaseOrderItem
  17. from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:266:in `load_missing_constant'
  18. from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
  19. from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
  20. from (irb):3
  21. >>
Add Comment
Please, Sign In to add comment