Class: LedgerDetailProject
- Inherits:
-
LedgerProject
- Object
- ActiveRecord::Base
- ApplicationRecord
- LedgerProject
- LedgerDetailProject
- Includes:
- Models::Auditable
- Defined in:
- app/models/ledger_detail_project.rb
Overview
== Schema Information
Table name: ledger_projects
Database name: primary
id :integer not null, primary key
description :string(255) not null
project_number :integer not null
type :string(255)
created_at :datetime
updated_at :datetime
creator_id :integer
parent_id :integer
updater_id :integer
Indexes
idx_ledger_projects_where_id (type) WHERE (id IS NULL)
index_ledger_projects_on_type (type)
project_number_type (project_number,type)
Constant Summary
Constants included from Models::Auditable
Models::Auditable::ALWAYS_IGNORED
Constants inherited from LedgerProject
Instance Attribute Summary
Attributes inherited from LedgerProject
Has many collapse
- #item_ledger_entries ⇒ ActiveRecord::Relation<ItemLedgerEntry>
- #ledger_entries ⇒ ActiveRecord::Relation<LedgerEntry>
Methods inherited from LedgerProject
Class Method Summary collapse
Methods included from Models::Auditable
#all_skipped_columns, #audit_reference_data, #creator, #should_not_save_version, #stamp_record, #updater
Methods inherited from LedgerProject
is_valid_type?, #name_for_select, #summary_name, types_for_select
Methods included from Models::Lineage
#ancestors, #ancestors_ids, #children_and_roots, #descendants, #descendants_ids, #ensure_non_recursive_lineage, #family_members, #generate_full_name, #generate_full_name_array, #lineage, #lineage_array, #lineage_simple, #root, #root_id, #self_ancestors_and_descendants, #self_ancestors_and_descendants_ids, #self_and_ancestors, #self_and_ancestors_ids, #self_and_children, #self_and_descendants, #self_and_descendants_ids, #self_and_siblings, #self_and_siblings_ids, #siblings, #siblings_ids
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Class Method Details
.readable_type ⇒ Object
29 30 31 |
# File 'app/models/ledger_detail_project.rb', line 29 def self.readable_type "Detail" end |
.select_options ⇒ Object
33 34 35 |
# File 'app/models/ledger_detail_project.rb', line 33 def self. all.order("project_number asc").to_a.map{|p| [p.summary_name, p.id]} end |
Instance Method Details
#item_ledger_entries ⇒ ActiveRecord::Relation<ItemLedgerEntry>
27 |
# File 'app/models/ledger_detail_project.rb', line 27 has_many :item_ledger_entries |
#ledger_entries ⇒ ActiveRecord::Relation<LedgerEntry>
26 |
# File 'app/models/ledger_detail_project.rb', line 26 has_many :ledger_entries, :inverse_of => :ledger_detail_project |