Created
June 26, 2012 21:10
-
-
Save arockwell/2999060 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
ActiveRecord::Base.connection.execute("delete from article_info where article_id = 1") | |
article_infos = ArticleInfo.find_all_by_article_id(1) | |
article_infos.size.should == 0 | |
article_copy1 = Article.find(1) | |
puts "article_info1: #{article_copy1.article_info}" | |
article_copy2 = Article.find(1) | |
puts "article_info2: #{article_copy2.article_info}" | |
article_copy1.last_slide = 1 | |
article_copy2.last_slide = 2 | |
article_copy1.save | |
article_copy2.save | |
article_infos = ArticleInfo.find_all_by_article_id(1) | |
article_infos.size.should == 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment