mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22: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:
|
||||
Enabled: false
|
||||
|
||||
Style/MissingElse:
|
||||
Enabled: true
|
||||
EnforcedStyle: case
|
||||
|
||||
Style/EmptyElse:
|
||||
EnforcedStyle: empty
|
||||
|
||||
Style/MultilineOperationIndentation:
|
||||
EnforcedStyle: indented
|
||||
|
||||
|
||||
@ -68,6 +68,8 @@ module ActiveModel
|
||||
self.class.new(@hash[:*])
|
||||
when @hash.key?(:**)
|
||||
self.class.new(:** => {})
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user