-
Notifications
You must be signed in to change notification settings - Fork 897
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
Conversation
@@ -63,6 +63,7 @@ class ServiceTemplate < ApplicationRecord | |||
|
|||
belongs_to :service_template_catalog | |||
belongs_to :zone | |||
belongs_to :currency, :class_name => "ChargebackRateDetailCurrency", :inverse_of => false |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
a6d1ff6
to
85d94e1
Compare
85d94e1
to
43bc02d
Compare
Checked commit lfu@43bc02d with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
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