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

embeds_one respond_to?(:persisted?) problem

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

      hi

      i have a problem with this code:

      form_for person.name

      will create a POST form, and thats wrong because the object already exsists and i need a PUT form.

      the problem is that rails does this in the form_helper.rb in the line 329

      if object.respond_to?(:persisted?) && object.persisted?

      it returns false because object.respond_to?(:persisted?) is false. not sure why but im sure its a bug.

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

              Created:
              Updated:
              Resolved: