mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Use == || == instead of include?
This commit is contained in:
parent
eb5b27de69
commit
ecbb8bf6a6
@ -18,11 +18,11 @@ module ActiveModel
|
||||
alias :embed_in_root? :embed_in_root
|
||||
|
||||
def embed_ids?
|
||||
[:id, :ids].include? embed
|
||||
embed == :id || embed == :ids
|
||||
end
|
||||
|
||||
def embed_objects?
|
||||
[:object, :objects].include? embed
|
||||
embed == :object || embed == :objects
|
||||
end
|
||||
|
||||
def embeddable?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user