Sha256: 4a6435cf699dc9f3be8aadf5e56dd3edc433b060c31e1a11f85e1324626bf33f

Contents?: true

Size: 245 Bytes

Versions: 5

Compression:

Stored size: 245 Bytes

Contents

class UserForm
  include ActiveForm::Form
  include ActiveForm::ValidateUniqueness

  properties :name, :category_id, :category, on: :user

  validates_uniqueness_of :name, :user

  self.main_model = :user

  validates :name, presence: true
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activeform-rails-0.0.5 spec/dummy/app/forms/user_form.rb
activeform-rails-0.0.4 spec/dummy/app/forms/user_form.rb
activeform-rails-0.0.3 spec/dummy/app/forms/user_form.rb
activeform-rails-0.0.2 spec/dummy/app/forms/user_form.rb
activeform-rails-0.0.1 spec/dummy/app/forms/user_form.rb