You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2021. It is now read-only.
Should we implicitly make the project-creating-user a collaborator?
What about a user creating a project who is not a collaborator on THAT same project? (Should this be possible?)
UUID auto generation
This is not the Rails Way(tm). Except I don't like binding model logic to persistence with hooks.
Possibly fix with after_initialize() ; if new? ... ; end
See: The Rails 3 Way, page 308. It's called after each DB load. :/
The text was updated successfully, but these errors were encountered:
No sure i'm getting this (i wont open right now the R3 way i'm about to.. take a NAP!), but don't use too much after_initialize. The reason behind this is that when you do user = User.first, user.initialize is never called. Instead, AR will call user = User.allocate, then use instance_variable_set on @attributes, and finally fire-off the callbacks.
So after_initialize would only work when you do User.new (and so, new? will always be true in this method)
Really?
Should we implicitly make the project-creating-user a collaborator?
What about a user creating a project who is not a collaborator on THAT same project? (Should this be possible?)
UUID auto generation
This is not the Rails Way(tm). Except I don't like binding model logic to persistence with hooks.
Possibly fix with after_initialize() ; if new? ... ; end
See: The Rails 3 Way, page 308. It's called after each DB load. :/
The text was updated successfully, but these errors were encountered: