Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PurchaseOrderItem < ActiveRecord::Base
- # -- other stuff --
- Status_Not_Ordered = 1
- @@statuses = {Status_Not_Ordered => 'Not Ordered', 2=>'Ordered', 3=>'Backordered', 4=>'Cancelled', 5=> 'Other (see notes)'}
- # -- other stuff --
- end
- Now in IRB:
- >> PuchaseOrderItem.Status_Not_Ordered
- NameError: uninitialized constant PuchaseOrderItem
- from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:266:in `load_missing_constant'
- from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
- from /home/jon/My Documents/Development/OfficeToWeb/gromit/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
- from (irb):3
- >>
Add Comment
Please, Sign In to add comment