Sha256: 55459b187ad1b9533c1e22c2cc2eb480d52f5194d5d19ca25a98a2af7a9b5e7d

Contents?: true

Size: 655 Bytes

Versions: 5

Compression:

Stored size: 655 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

  # fix me
  validates :email, email: true, uniqueness: true, on: :destroy unless model_class.columns_hash['project_id'].present?

  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

5 entries across 5 versions & 1 rubygems

Version Path
tramway-user-2.2.1.2 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.2.1 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.2 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.1.4 app/forms/admin/tramway/user/user_form.rb
tramway-user-2.1.3.4 app/forms/admin/tramway/user/user_form.rb