-
Notifications
You must be signed in to change notification settings - Fork 11
rubocop fixes #198
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
rubocop fixes #198
Conversation
From Pull Request: ManageIQ/activerecord-virtual_attributes#198
end | ||
|
||
ActiveRecord::Base.include VirtualAttributes::VirtualTotal | ||
ActiveSupport.on_load(:active_record) { include VirtualAttributes::VirtualTotal } |
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.
Should it be this in the block: ActiveRecord::Base.include VirtualAttributes::VirtualTotal
?
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.
@jrafanie I totally worried about this.
I have gone over this in my mind many times.
I ran the code with a few options:
- commenting this out (base case to ensure it was doing something)
AS.include(AR::VT)
(original)AS.on_load { AS.include(AR::VT) }
AS.on_load { include(AR::VT) }
ruboco
complains about both of the AS.include(AR::VT)
cases.
Maybe I should just drop that change.
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.
yeah, I don't mind fixing warnings that are trivial. This one doesn't feel trivial. Let's get the others in on their own.
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.
just a single question, everything else looks good
update:
|
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.
LGTM
We may need to cross repo w/ a fix for
include
@miq-bot cross-repo-test /all