Skip to content

Commit

Permalink
Merge pull request #565 from kbrock/alias_attribute_access
Browse files Browse the repository at this point in the history
Expose attribute_aliases as attributes
  • Loading branch information
jrafanie authored Feb 11, 2025
2 parents 037fd1f + 18dff46 commit 69cb3c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.ar_model_associations

def self.expose_class_attributes(subclass)
subclass.class_eval do
model.attribute_names.each do |attr|
model.all_attribute_names.each do |attr|
next if model.private_method_defined?(attr)
next if EXPOSED_ATTR_BLACK_LIST.any? { |rexp| attr =~ rexp }
next if subclass.base_class != self && method_defined?(attr)
Expand Down
1 change: 1 addition & 0 deletions spec/service_models/miq_ae_service_flavor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
expect(@service_flavor.name).to eq("small")
expect(@service_flavor.description).to eq("really small")
expect(@service_flavor.cpus).to eq(1)
expect(@service_flavor.cpu_total_cores).to eq(1)
expect(@service_flavor.memory).to eq(2.gigabytes)
expect(@service_flavor).to be_kind_of(MiqAeMethodService::MiqAeServiceFlavor)
end
Expand Down

0 comments on commit 69cb3c9

Please sign in to comment.