activer record association code example Example: active record create association @book = @author.books.create(published_at: Time.now)