Skip to content
This repository

:before_add callback for has_one association #2050

Closed
dkharrat opened this Issue July 12, 2011 · 5 comments

6 participants

Dia Kharrat Rafael Mendonça França Damien Mathieu Kurakin Alexander Tsyren Ochirov Kirill Lashuk
Dia Kharrat

The has_many association provides a :before_add callback (which is useful when needing, for example, to initialize some attributes of the child object based on some attributes of the parent).

However, the has_one association does not provide this callback. Is there any reason for this? I encountered a situation where I needed it. Can it be added?

Damien Mathieu
Collaborator

Do you feel like providing a pull request ?

Note : we're too close to 3.1 to include it there. Therefore, this feature will be in 3.2, not before.

Kurakin Alexander

Ok, and what about it? It seems to be interesting and skillfull!

Tsyren Ochirov

+1

Kirill Lashuk

Looks like a duplicate of #586.

Rafael Mendonça França
Owner

Hey guys. I'm closing this one. You can follow the #586 issue.

Thanks for reporting.

Rafael Mendonça França rafaelfranca closed this March 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.