Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
user = User.find(1)
site = Site.new
site.url = "http://www.google.com"
site.name = "Google"
user.sites << site
if user.save
'cool'
else
'not so cool'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment