Class: ItAsset
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ItAsset
- Defined in:
- app/models/it_asset.rb
Overview
== Schema Information
Table name: it_assets
Database name: primary
id :integer not null, primary key
description :text
device_type :string(255)
is_inactive :boolean
it_accessories :text
location :text
memory :string(255)
name :string(255)
notes :text
order_number :string(255)
phone_number :string(255)
processor :string(255)
screen_size :integer
serial_number :string(255)
software :string(255)
warranty_expiration_date :date
created_at :datetime not null
updated_at :datetime not null
company_id :integer
employee_id :integer
supplier_id :integer
Instance Attribute Summary collapse
- #screen_size ⇒ Object readonly
Belongs to collapse
Class Method Summary collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Instance Attribute Details
#screen_size ⇒ Object (readonly)
31 |
# File 'app/models/it_asset.rb', line 31 validates :screen_size, :numericality => true, if: -> { screen_size.present? } |
Class Method Details
.device_type_for_select ⇒ Object
36 37 38 |
# File 'app/models/it_asset.rb', line 36 def self.device_type_for_select %w[Laptop Desktop Phone Cell Tablet Mini Printer Monitor Peripheral Other] end |