File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ class Config
99 attribute :when_invalid , Symbol , default : proc { :skip }
1010 attribute :after_build_blocks , Array [ Proc ] , default : [ ]
1111 attribute :after_save_blocks , Array [ Proc ] , default : [ ]
12+ attribute :sql_transaction , Symbol , default : proc { :all_rows }
1213
1314 def initialize_copy ( orig )
1415 super
1516 self . column_definitions = orig . column_definitions . dup
1617 self . identifiers = orig . identifiers . dup
1718 self . after_save_blocks = orig . after_save_blocks . dup
1819 self . after_build_blocks = orig . after_build_blocks . dup
20+ self . sql_transaction = orig . sql_transaction . dup
1921 end
2022
2123 def after_build ( block )
Original file line number Diff line number Diff line change @@ -27,5 +27,9 @@ def after_build(&block)
2727 def after_save ( &block )
2828 config . after_save ( block )
2929 end
30+
31+ def sql_transaction ( behavior )
32+ config . sql_transaction = behavior
33+ end
3034 end
3135end
You can’t perform that action at this time.
0 commit comments