Here is an article that gives detailed explaination of this association with the following example:
“A user can have only one passport.”
Must accomplish the following:
- Able to associate 2 tables/models through
has_one
association.
Run the following commands to execute locally:
The following will install required version of ruby (make sure rvm is installed.)
rvm install x
rvm use x
git clone git@github.com:JuzerShakir/has_one.git
cd has_one
bundle install
rails c