2008-04-12

The difference between << and create

关键字: rails
1. << is transactional, create is not
2. << method triggers the :before_add and :after_add callbacks, but the create method does not
3. << method returns operation_success ? association_proxy : false, while the create method returns the new instance created.
评论
发表评论

您还没有登录,请登录后发表评论

studyworks
搜索本博客
最近访客
存档
最新评论