Created
September 30, 2018 20:48
-
-
Save sandboxws/4b3d8a814b0c8428cd1723a1688126a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Author | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| field :first_name, type: String | |
| field :last_name, type: String | |
| field :email, type: String | |
| has_many :posts | |
| end | |
| class Article | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| field :title, type: String | |
| field :description, type: String | |
| belongs_to :author, index: true | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment