Sha256: dbad94e03a142f641e5944dce5a2bbbe3f6984935d02c893ec158e920ee52c2d

Contents?: true

Size: 237 Bytes

Versions: 2

Compression:

Stored size: 237 Bytes

Contents

class UserCreator1 < TransForms::FormBase
  attr_reader :user

  attribute :name,      String
  attribute :age,       Numeric

  validates :name, presence: true

  transaction do
    @user = User.create!(name: name, age: age)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trans_forms-0.2.0 spec/support/trans_forms/user_creator_1.rb
trans_forms-0.1.0 spec/support/trans_forms/user_creator_1.rb