Sha256: 565e3b01cb7a76d1f71d742a10d4c223ffcc7f92077e747607c09099400be77a
Contents?: true
Size: 653 Bytes
Versions: 4
Compression:
Stored size: 653 Bytes
Contents
class MultipleRecordsCreator < TransForms::FormBase attr_reader :user1, :user2 attribute :name1, String attribute :name2, String validates :name1, presence: true validates :name2, presence: true transaction do @user1 = User.create!(name: name1) @user2 = User.create!(name: name2) end end class MultipleRecordsCreatorNoBang < TransForms::FormBase attr_reader :user1, :user2 attribute :name1, String attribute :name2, String validates :name1, presence: true validates :name2, presence: true transaction do @user1 = User.create(name: name1) @user2 = User.create(name: name2) end end
Version data entries
4 entries across 4 versions & 1 rubygems