undefined method `[]' for true:TrueClass

10,827

options is probably defined as true. We can't really know why without more information.

Share:
10,827

Related videos on Youtube

felix
Author by

felix

Updated on June 04, 2022

Comments

  • felix
    felix almost 2 years

    I am getting undefined method [] for true:TrueClass error while running the rake task in acts_as_recommendable plugin. The error points to the following line.

      items = options[:on_class].find(:all).collect(&:id)
    

    Can someone please tell what am i doing incorrectly.

    • Jim Schubert
      Jim Schubert almost 14 years
      it looks to me like you're doing something like key = true where you mean to do key => true
    • Ed S.
      Ed S. almost 14 years
      yeah, obviously 'options' is not a hash.