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

Mongoid::Versioning and attr_accessible/protected Problem

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

      When the attr_accessible or protected are included in the model, mongoid does not include the protected fields when versioning.

      When i have a model that has attr_accessible :name, saving the record would always yield a version: 1 because the version field is not accessible. Versioning behaves properly when I do attr_accessible :name, :version but it actually defeats the purpose of protecting the fields from mass assignment.

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

              Created:
              Updated:
              Resolved: