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

API Cleanup for Safe Mode, Versions, etc.

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

      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

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

              Created:
              Updated:
              Resolved: