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

Userstamps not set when updating/creating children #6

Open
ghost opened this issue Sep 29, 2010 · 2 comments
Open

Userstamps not set when updating/creating children #6

ghost opened this issue Sep 29, 2010 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 29, 2010

Hello,

When one updates or creates children with complex forms using accept_nested_attributes_for, the userstamps don't get updated for the modified children.

I think instead of using a before and after filter in the Stampable module, you should use an alias_method_chain (e.g. base.alias_method_chain :create, :userstamps) as in Rails' Timestamp module.

This worked for me

Regards

@grosser
Copy link

grosser commented Sep 29, 2010

sounds strange that after_create should not work...
did you also add stamping to the nested model ?

@ghost
Copy link
Author

ghost commented Sep 29, 2010

Yes, I did. I didn't add stamping to the "parent" model though, maybe it has something to do with that. I will take a better look at it tomorrow.

richwallett pushed a commit to richwallett/userstamp that referenced this issue Jan 13, 2018
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

1 participant