Skip to content

Generate uuid after initialize to support validations on id#16

Open
thetamind wants to merge 2 commits intojashmenn:masterfrom
thetamind:after_initialize
Open

Generate uuid after initialize to support validations on id#16
thetamind wants to merge 2 commits intojashmenn:masterfrom
thetamind:after_initialize

Conversation

@thetamind
Copy link
Copy Markdown

Generate the uuid during after_initialize instead of before_create as suggested in #6. This enables validation of id or other uuid attributes.

@jashmenn
Copy link
Copy Markdown
Owner

jashmenn commented Nov 5, 2012

cool ill take a look at this shortly.

@jashmenn
Copy link
Copy Markdown
Owner

jashmenn commented Nov 7, 2012

@thetamind - this looks like a good change, however we've changed the way we're testing a bit so the merge fails. Could you update the commit to match the current testing structure? Then I'll merge in the after_initialize change.

@pyromaniac
Copy link
Copy Markdown
Collaborator

Dude, Can you rebase your patch please, or I'll do it )

@pyromaniac
Copy link
Copy Markdown
Collaborator

I tried to implement this on top of master, but my specs failed because of after_initialize - reload with fields specified is not working.
Also I've recall why I did not do this after_initialize - it is not default AR behavior, the default is to ask for id after_create, so I've make it compatible. I have no any idea, why do you need to validate id before creation.

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

Successfully merging this pull request may close these issues.

3 participants