Created
May 3, 2019 13:40
-
-
Save koss-lebedev/071af519621ff045e09c7410baca7c31 to your computer and use it in GitHub Desktop.
This file contains 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
contact = Contact.new | |
# first_name is a regular attribute mapped to | |
# a column in contacts table | |
contact.first_name = 'John' | |
# age attribute was added dynamically | |
contact.age = 27 | |
contact.save | |
# we can also do this | |
second_contact = Contact.new(first_name: 'Jane', age: 25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment