Skip to content
This repository was archived by the owner on Sep 30, 2018. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/vienna
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 709d1475b430
Choose a base ref
...
head repository: opal/vienna
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 20278588707b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Feb 11, 2014

  1. Copy the full SHA
    e76712f View commit details
  2. Add Model#destroyed?

    elia committed Feb 11, 2014
    Copy the full SHA
    2027858 View commit details
Showing with 7 additions and 0 deletions.
  1. +7 −0 opal/vienna/persistence.rb
7 changes: 7 additions & 0 deletions opal/vienna/persistence.rb
Original file line number Diff line number Diff line change
@@ -79,6 +79,10 @@ def new_record?
@new_record
end

def destroyed?
@destroyed
end

def loaded?
@loaded
end
@@ -106,7 +110,10 @@ def destroy(&block)
# a `:destroy` event. If you override this method, you *must* call super,
# otherwise undefined bad things will happen.
def did_destroy
@destroyed = true
self.class.identity_map.delete self.id
self.class.all.delete self

trigger_events(:destroy)
end