Skip to content

Commit 69cb3c9

Browse files
authored
Merge pull request #565 from kbrock/alias_attribute_access
Expose attribute_aliases as attributes
2 parents 037fd1f + 18dff46 commit 69cb3c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def self.ar_model_associations
6060

6161
def self.expose_class_attributes(subclass)
6262
subclass.class_eval do
63-
model.attribute_names.each do |attr|
63+
model.all_attribute_names.each do |attr|
6464
next if model.private_method_defined?(attr)
6565
next if EXPOSED_ATTR_BLACK_LIST.any? { |rexp| attr =~ rexp }
6666
next if subclass.base_class != self && method_defined?(attr)

spec/service_models/miq_ae_service_flavor_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
expect(@service_flavor.name).to eq("small")
99
expect(@service_flavor.description).to eq("really small")
1010
expect(@service_flavor.cpus).to eq(1)
11+
expect(@service_flavor.cpu_total_cores).to eq(1)
1112
expect(@service_flavor.memory).to eq(2.gigabytes)
1213
expect(@service_flavor).to be_kind_of(MiqAeMethodService::MiqAeServiceFlavor)
1314
end

0 commit comments

Comments
 (0)