Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 53 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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. >>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top