Hi,

We found this tiny useful plugin that allows to detect if model instance 
was just created:

```
module Sequel
  module Plugins
    module JustCreated
      module InstanceMethods
        def after_create
          @just_created = true
          super
        end

        def just_created?
          @just_created == true
        end
      end
    end
  end
end
```

I was trying to do it using :dirty plugin but didn't found a way, maybe I 
missing something? If not don't you mind if we create PR to include this 
plugin into sequel?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/2fa34c56-0866-4053-a13e-bbcb60e3ab30n%40googlegroups.com.

Reply via email to