nil.enroll(aetheric_username, quantum_class_id) (adric) wrote,
nil.enroll(aetheric_username, quantum_class_id)
adric

Durrr .. what?? (fixed)

>> @item.orders_products_id
=> 5
>> @mop.orders_products_id = @item.orders_products_id
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.delete[etc]

Is this like when the optometrist got a funny look on his face and later admitted my answer had broken a law of physics?

>> @mop.type
(irb):4: warning: Object#type is deprecated; use Object#class
=> MoocashOrderProcessing(orders_products_id: integer, orders_id: integer, processed: integer)
>> @mop.processed = 3
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.delete[usw.]
And the
>> @mop              
NoMethodError: You have a nil object when you didn't expect it!

The constructor was erroring out before the object is created because of my debug line which printed the type of the passed object (which there isn't one in this session). But the real answer was this:
super(nil)

Tags: bug, rails
Subscribe

  • To not quote Ms. Spears...

    Oops? I managed to avoid keeping this one only by sheer force of willpower, and I could tell she was disappointed. *long drawn out sigh* We…

  • Hopped onto SL tonight and got some chat in, sideways

    ... at a funny angle with an @adj_list av I've 'known' for ages but don't know at all. We got a chance to talk for the first time in ages (or…

  • SL Renewal? Downgrade to Free

    Nets me a form to fill out: "You've decided to discontinue land ownership in Second Life, and it would help us a lot to understand why."…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments