Sha256: bf7077f1964912054290218443278025a17ef84e5c71f6027e72b434c36fa6c6

Contents?: true

Size: 267 Bytes

Versions: 17

Compression:

Stored size: 267 Bytes

Contents

class UserForm < ROM::Model::Form
  input do
    set_model_name 'User'

    attribute :name, String
    attribute :email, String
  end

  validations do
    relation :users

    validates :name, :email, presence: true
    validates :email, uniqueness: true
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rom-rails-0.9.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.9.0.beta1 spec/dummy/app/forms/user_form.rb
rom-rails-0.8.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.7.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.6.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.6.0.rc1 spec/dummy/app/forms/user_form.rb
rom-rails-0.6.0.beta1 spec/dummy/app/forms/user_form.rb
rom-rails-0.5.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.5.0.rc1 spec/dummy/app/forms/user_form.rb
rom-rails-0.5.0.beta1 spec/dummy/app/forms/user_form.rb
rom-rails-0.4.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.3 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.2 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.1 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.0 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.0.rc1 spec/dummy/app/forms/user_form.rb
rom-rails-0.3.0.beta1 spec/dummy/app/forms/user_form.rb