mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Enforce case requires else; allow else nil
This commit is contained in:
parent
bac43af0e6
commit
1d8a3d039a
@ -45,6 +45,13 @@ Style/ClassAndModuleChildren:
|
|||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Style/MissingElse:
|
||||||
|
Enabled: true
|
||||||
|
EnforcedStyle: case
|
||||||
|
|
||||||
|
Style/EmptyElse:
|
||||||
|
EnforcedStyle: empty
|
||||||
|
|
||||||
Style/MultilineOperationIndentation:
|
Style/MultilineOperationIndentation:
|
||||||
EnforcedStyle: indented
|
EnforcedStyle: indented
|
||||||
|
|
||||||
|
|||||||
@ -68,6 +68,8 @@ module ActiveModel
|
|||||||
self.class.new(@hash[:*])
|
self.class.new(@hash[:*])
|
||||||
when @hash.key?(:**)
|
when @hash.key?(:**)
|
||||||
self.class.new(:** => {})
|
self.class.new(:** => {})
|
||||||
|
else
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user