mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Merge pull request #1186 from bf4/empty_else
Enforce case requires else; allow else nil
This commit is contained in:
commit
35473cf983
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,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