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

API Cleanup for Safe Mode, Versions, etc.

    XMLWordPrintable

    Details

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

      Description

      Currently there are some inconsistent ways of doing various things with proxies/blocks etc that should all have a common and consistent API. We should allow them all do use either syntax.

      Safe Mode:

      person.safely.save
       
      safely do
        person.save
        address.update_attribute(:street, "Forsterstr.")
      end
      

      Versioning:

      person.versionless.save
       
      versionless do
        person.save
        Agent.create(:name => "007")
      end
      

      Timestamping:

      {{`}}ruby
      person.timeless.save

      timeless do
      person.save
      Account.create(:name => "savings")
      end

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: