Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2503

has_and_belongs_to_many no method error

      I have a code

      class Person
        has_and_belongs_to_many :things
      end
      class Thing
        has_and_belongs_to_many :people
      end
      

      which results in

      @person.things #no method

      And this code fixes this. Is it bug? If not it is not clear why this happens.

      class Person
        has_and_belongs_to_many :things, :inverse_of => :people
      end
      class Thing
        has_and_belongs_to_many :people, :class_name => 'Person'
      end
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            onemanstartup onemanstartup
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: