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

undefined method `inverse_of_field' for nil:NilClass

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.6
    • Affects Version/s: None
    • Component/s: None

      I have a project which was running very well before upgrading to latest mongoid. I have relationship that looks something like:

      User
      has_many :authentications

      Authentication
      belongs_to :user

      When creating new record of both User and Authentication everything seems to be running well but when updating existing User object, error above appears. Update code looks something like:

      user = authentication.user
      user.first_name = first_name
      user.last_name = last_name
      user.nick_name = nick_name
      user.save

      Application throws exception when you call user.save

      Hope somebody clears out a solution or at least somewhere where I can start looking.

      Thanks

            Assignee:
            durran Durran Jordan
            Reporter:
            reyjexter reyjexter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: