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

Rename the Method new? to new_record?

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

      Hello everyone.
      I just experienced a nice Bug that took me some time to figure out.
      I had a Mongoid Document with a Workflow included. I had a state new, which created a method called "new?", checking, if the state was set to 'new'. So when Mongoid checked for new? it got the information, the state was new, and created a new document.
      So it would be nice, to rename the method to new_document? or new_record? like ActiveRecord does.
      i can start doing this, if you guys are OK with this.

      Regards,
      -Rainer

            Assignee:
            Unassigned Unassigned
            Reporter:
            rynr Rainer Jung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: