It’s quite easy to create tables with Ruby On Rails. However, some cases require personalizations to reproduce real world situations and the relati...
For further actions, you may consider blocking this person and/or reporting abuse
@luchiago , thanks for the wonderful post of yours. You saved me from a big headache. I was wondering whether or not I would be able to find a post on this particular topic for Rails v6. Yeah, I'm now learning the basics, you know? Thanks man
Hey @jelilfaisalabudu , I appreciate your feedback and that I could help you! Stay strong and keep learning every day.
Could you add "inverse_of" to your examples?
Why it's necessary?
Rubocop would complain if you don't have it.
If you have data in these tables (e.g. when changing the tables instead of creating them), you need to make sure the columns have valid values before adding foreign key constraints.
You mean, for the available_user and requester_user variables?
I mean data records in these tables (not variables).
Thanks a lot for the great post! I was just building this and it was hard to wrap my mind around it. Your post scratches the exact itch!
Glad to hear this!
@luchiago Thanks! I spent much time today trying to solve this