Created
          March 15, 2023 14:36 
        
      - 
      
 - 
        
Save avidmaulanas/372b57fe3d98614d1d99fdf35e2b8ed7 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
avidmaulanas created this gist
Mar 15, 2023 .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,15 @@ # == Schema Information # # Table name: adjust_quantities # # quantity_in_stock :int class AdjustQuantity attr_accessor :adjust_quantity def adjust_quantity=(val) # method attribute_will_change! for trigger callbacks from parent save attribute_will_change!(:quantity_in_stock) unless val == @adjust_quantity @adjust_quantity = val end end