Skip to content
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

How do I find out what a record looked like when it was first created? #179

Closed
krisleech opened this issue Oct 24, 2012 · 3 comments
Closed

Comments

@krisleech
Copy link

fruit = Fruit.create(:name => 'Apple')
fruit.update_attributes(:name => 'Pear')
fruit.update_attributes(:name => 'Orange')

first_version = fruit.versions[0]

first_version.event # => 'create'
first_version.changeset # => {}

How do I get the attributes for the creation of an object, i.e { :name => 'Apple' } ?

@batter
Copy link
Collaborator

batter commented Oct 24, 2012

This has been fixed in the head of the code, by the merge of #172, but an official release has not been made since then. I'm hoping to do that within a week or two, I just want to try to tackle a few more pull requests first. In the meantime, if you need this functionality, you can pull the gem from the repository.

@batter batter closed this as completed Oct 24, 2012
@krisleech
Copy link
Author

I can confirm this works using the HEAD commit. Many thanks!

@batter
Copy link
Collaborator

batter commented Nov 16, 2012

Just released version 2.6.4, which contains the fix for this. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants