Skip to content

Commit 47a14b6

Browse files
committed
Improve ActionController::Serialization readability
1 parent 170db3b commit 47a14b6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/action_controller/serialization.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ module Serialization
1010
# Deprecated
1111
ADAPTER_OPTION_KEYS = ActiveModel::SerializableResource::ADAPTER_OPTION_KEYS
1212

13+
module ClassMethods
14+
def serialization_scope(scope)
15+
self._serialization_scope = scope
16+
end
17+
end
18+
1319
included do
1420
class_attribute :_serialization_scope
1521
self._serialization_scope = :current_user
@@ -59,11 +65,5 @@ def use_adapter?
5965
super(serializable_resource, options)
6066
end
6167
end
62-
63-
module ClassMethods
64-
def serialization_scope(scope)
65-
self._serialization_scope = scope
66-
end
67-
end
6868
end
6969
end

0 commit comments

Comments
 (0)