Sha256: 00225078e364718ab6bec1671bb23bb61b70072270ddd8dbde78e216e2070cb3

Contents?: true

Size: 557 Bytes

Versions: 4

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

class Admin::Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
  self.model_class = Tramway::User::User

  properties :email, :password, :first_name, :last_name, :role, :phone

  validates :email, email: true

  def initialize(object)
    super(object).tap do
      form_properties email: :string,
                      password: :string,
                      first_name: :string,
                      last_name: :string,
                      phone: :string,
                      role: :default
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tramway-user-2.1.3.1 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.1.3 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.1.2.1 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.1.2 app/forms/admin/tramway/user/user_form.rb