-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Dirty Tracking API #57
Comments
|
Woohoo Mergy Christmas
…On Wed, Dec 21, 2016 at 6:42 PM, Nick Sutterer ***@***.***> wrote:
column_changes is changes in Disposable, happy to merge what you suggest,
@dnd <https://github.com/dnd>!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAH9Yv9qyFxMS2GBAYCdhAJHQrH-cbKQks5rKNhugaJpZM4LRg7V>
.
|
I don't think I think the current implementation will have to change somewhat, in terms of storing the actual changes. Would also be nice to use |
The implementation is super simple: https://github.com/apotonick/disposable/blob/master/lib/disposable/twin/changed.rb#L38 There's |
The dirty tracking API could be made much more useful with some additional methods being provided. Taking from Sequel:
#column_changes
{name: ['old', 'new']}
#initial_value(column)
'old'
#initial_values
{name: 'old', amount: 0}
#reset_column(column)
obj.name => 'old'
The text was updated successfully, but these errors were encountered: