Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add currency to service template. #18754

Merged
merged 1 commit into from
May 20, 2019
Merged

Conversation

lfu
Copy link
Member

@lfu lfu commented May 13, 2019

Add price and currency to service templates. So a service author can specify the price when creating a service template.

Part of ManageIQ/manageiq-schema#367.

https://bugzilla.redhat.com/show_bug.cgi?id=1602072

@miq-bot add_label enhancement, hammer/no, changelog/yes
@miq-bot assign @tinaafitz

@lfu
Copy link
Member Author

lfu commented May 20, 2019

@lpichler @carbonin @Fryguy Could you please review this?

@@ -63,6 +63,7 @@ class ServiceTemplate < ApplicationRecord

belongs_to :service_template_catalog
belongs_to :zone
belongs_to :currency, :class_name => "ChargebackRateDetailCurrency", :inverse_of => false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the :inverse_of => false do here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, @jrafanie found https://github.com/rails/rails/blob/5-0-stable/activerecord/lib/active_record/associations.rb#L704-L718 for me so it sounds like this is just telling AR that we're never going to ask for a currency's service templates which makes sense.

@miq-bot
Copy link
Member

miq-bot commented May 20, 2019

Checked commit lfu@43bc02d with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

@carbonin carbonin assigned carbonin and unassigned tinaafitz May 20, 2019
@carbonin carbonin merged commit d0a06e6 into ManageIQ:master May 20, 2019
@carbonin carbonin added this to the Sprint 112 Ending May 27, 2019 milestone May 20, 2019
@lfu lfu deleted the service_price_1602072 branch November 4, 2019 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants