Skip to content

Commit

Permalink
remove redefine include_root_in_json warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DarshanaVenkatesh committed Dec 13, 2024
1 parent ac9fc2a commit 198a505
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mongoid/serializable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module Serializable
included do

class << self
remove_method :include_root_in_json if method_defined?(:include_root_in_json)
remove_method :include_root_in_json= if method_defined?(:include_root_in_json=)
def include_root_in_json
@include_root_in_json.nil? ? ::Mongoid.include_root_in_json : @include_root_in_json
end
Expand Down

0 comments on commit 198a505

Please sign in to comment.