Rails Guide — Part 4 Database Models

We do need to remove null:false inside of the migration since we already have some book objects but they don’t have any author or publisher data
This gives us an instance method in author and book class, named books
This gives a book object instance methods named author and publisher

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store