Created
June 26, 2012 21:21
-
-
Save arockwell/2999152 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) | |
article_copy1.article_info.should == nil | |
article_copy2 = Article.find(1) | |
article_copy2.article_info.should == nil | |
puts "BEFORE LAST_SLIDE ASSIGNMENT 1" | |
puts "article_copy1 #{article_copy2.article_info.inspect}" | |
puts "article_copy2 #{article_copy2.article_info.inspect}" | |
article_copy1.last_slide = 1 | |
puts "BEFORE LAST_SLIDE ASSIGNMENT 2" | |
puts "article_copy1 #{article_copy2.article_info.inspect}" | |
puts "article_copy2 #{article_copy2.article_info.inspect}" | |
article_copy2.last_slide = 2 | |
puts "BEFORE article_copy1 save" | |
puts "article_copy1 #{article_copy2.article_info.inspect}" | |
puts "article_copy2 #{article_copy2.article_info.inspect}" | |
article_copy1.save | |
puts "BEFORE article_copy2 save" | |
puts "article_copy1 #{article_copy2.article_info.inspect}" | |
puts "article_copy2 #{article_copy2.article_info.inspect}" | |
article_copy2.save | |
puts "AFTER article_copy2 save" | |
puts "article_copy1 #{article_copy2.article_info.inspect}" | |
puts "article_copy2 #{article_copy2.article_info.inspect}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment