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

Rename the Method new? to new_record?

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: