Last active
          August 29, 2015 14:09 
        
      - 
      
 - 
        
Save moserrya/c276d5d8a93f8a54bfee to your computer and use it in GitHub Desktop.  
Revisions
- 
        
moserrya revised this gist
Nov 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,5 +4,5 @@ item.update_attributes!(state: "sold") end # item.update_attributes! fails a validation, which we rescue. new feeling that we created is rightly rolled back item.save #saves the feelings record that was rolled back as part of our transaction!  - 
        
moserrya revised this gist
Nov 9, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ item = Item.find 328 item.transaction do item.feelings.create!(size: 'huge') item.update_attributes!(state: "sold") end # item.update_attributes! fails a validation, which we rescue item.save #saves the feelings record that was rolled back as part of our transaction!  - 
        
moserrya created this gist
Nov 9, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ item = Item.find 328 item.transaction do item.feelings.create!(size: 'huge')