Sha256: edaf0e4b2a660bd99ae9d910379f1be6908d4045704dbdfd76ac6dd935fc3570

Contents?: true

Size: 271 Bytes

Versions: 2

Compression:

Stored size: 271 Bytes

Contents

class UserCreator1 < TransForms::FormBase
  attr_reader :user

  attribute :name,      String
  attribute :age,       Numeric

  attr_accessor :extra_attribute

  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.2 spec/support/trans_forms/user_creator_1.rb
trans_forms-0.2.1 spec/support/trans_forms/user_creator_1.rb