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
Using just :presence => true on the owner checks the table to see if it exists, at least while using Rails 3.2.19 and testing it in the console. Trying to use an owner_id that doesn't exist will fail validation.
Using :associated => true makes it more difficult to add a new required field. For example, a phone number is now required, but forcing existing users to immediately provide one so their user record is considered valid and they can comment again is probably overkill.
Perhaps this has changed in Rails? I've read conflicting questions / answers on the topic ...
The text was updated successfully, but these errors were encountered:
I agree with you in parts. It's not that it's overkill but it is enforcing
something you might not want on your application.
As for the owner_I'd not being checked it is how I intended it to be. I
need a user so I can fetch it and do stuff with. I can't work only the id.
The id validation is done on the database level.
I suggest you remove that associated validation on your fork and if you
feel like it, submit a pull request and I'll merge it in :)
Using just :presence => true on the owner checks the table to see if it
exists, at least while using Rails 3.2.19 and testing it in the console.
Trying to use an owner_id that doesn't exist will fail validation.
Using :associated => true makes it more difficult to add a new required
field. For example, a phone number is now required, but forcing existing
users to immediately provide one so their user record is considered valid
and they can comment again is probably overkill.
Perhaps this has changed in Rails? I've read conflicting questions /
answers on the topic ...
—
Reply to this email directly or view it on GitHub #45.
Oh boy, I'm sorry for the delay... Found that response on my email drafts (should've been sent the same day you opened the issue but apparently it didn't)
Using just
:presence => true
on the owner checks the table to see if it exists, at least while using Rails 3.2.19 and testing it in the console. Trying to use an owner_id that doesn't exist will fail validation.Using
:associated => true
makes it more difficult to add a new required field. For example, a phone number is now required, but forcing existing users to immediately provide one so their user record is considered valid and they can comment again is probably overkill.Perhaps this has changed in Rails? I've read conflicting questions / answers on the topic ...
The text was updated successfully, but these errors were encountered: