-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MONGOID-5809: remove ruby -w warnings #5921
Changes from 6 commits
7857378
ac9fc2a
198a505
41ce0f9
dc89eb5
63a5c04
1696b1d
b4b3dde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,8 +179,8 @@ def discriminator_value | |
|
||
included do | ||
class_attribute :discriminator_key, instance_accessor: false | ||
|
||
class << self | ||
remove_method :discriminator_key if method_defined?(:discriminator_key) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here -- please add a comment explaining that the preceding Also, the |
||
delegate :discriminator_key, to: ::Mongoid | ||
prepend DiscriminatorAssignment | ||
include DiscriminatorRetrieval | ||
|
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.
Nice! I had to dig a bit to understand that these methods are defined in ActiveModel, and we're just re-defining them here to account for our default value
Mongoid.include_root_in_json
. Maybe add a comment to that effect?Also, there's an extra space before these lines -- we've standardized on indentations in 2-space increments.