Sha256: caef6000f6b497852e3bcad42cd0f67d5ae23ebe3638659ece9a2689e7697de8

Contents?: true

Size: 328 Bytes

Versions: 3

Compression:

Stored size: 328 Bytes

Contents

class NoErrorInTransactionForm < TransForms::FormBase
  transaction do
    # Bunch of actions
    1 + 1; 'No errors'; [1,2,3].map(&:to_s)
    false # Can return false, save will be success anyway
  end
end

class ErrorInTransactionForm < TransForms::FormBase
  transaction do
    raise ActiveRecord::ActiveRecordError
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trans_forms-0.2.1 spec/support/trans_forms/simple_forms.rb
trans_forms-0.2.0 spec/support/trans_forms/simple_forms.rb
trans_forms-0.1.0 spec/support/trans_forms/simple_forms.rb