Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizKindly log in to use this feature. We’ll take you to the login page automatically.
LoginCourse Queries Syllabus Queries 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginReady to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I am working with Rails 3, and I have a model called User that authors a Syllabus. I would like to add the feature of "co-authoring" a syllabus, so the original author can invite a different user to make changes to the content.
Which options below makes more sense? (If there's something better, please let me know)
make the author attribute an array attribute, so that Syllabus.author would be an array containing all of its authors
create additional attributes to Syllabus, such as coauthor1, coauthor2
If the first one makes more sense, would you be able to specifically describe how would I make it an array attribute, and insert additional authors later?
One reason I was considering the second option was because that would allow a distinction between the original author and the other co-authors, enabling perhaps only the original author to delete the Syllabus, while other co-authors have limited authority?