File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -13,39 +13,6 @@ def self.config
13
13
autoload :Model
14
14
autoload :Callbacks
15
15
autoload :Logging
16
-
17
- module_function
18
-
19
- # @note
20
- # ```ruby
21
- # private
22
- #
23
- # attr_reader :resource, :adapter_opts, :serializer_opts
24
- # ```
25
- #
26
- # Will generate a warning, though it shouldn't.
27
- # There's a bug in Ruby for this: https://bugs.ruby-lang.org/issues/10967
28
- #
29
- # We can use +ActiveModelSerializers.silence_warnings+ as a
30
- # 'safety valve' for unfixable or not-worth-fixing warnings,
31
- # and keep our app warning-free.
32
- #
33
- # ```ruby
34
- # private
35
- #
36
- # ActiveModelSerializers.silence_warnings do
37
- # attr_reader :resource, :adapter_opts, :serializer_opts
38
- # end
39
- # ```
40
- #
41
- # or, as specific stopgap, define the attrs in the protected scope.
42
- def silence_warnings
43
- verbose = $VERBOSE
44
- $VERBOSE = nil
45
- yield
46
- ensure
47
- $VERBOSE = verbose
48
- end
49
16
end
50
17
51
18
require 'active_model/serializer'
You can’t perform that action at this time.
0 commit comments