mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56: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
|
alias :embed_in_root? :embed_in_root
|
||||||
|
|
||||||
def embed_ids?
|
def embed_ids?
|
||||||
[:id, :ids].include? embed
|
embed == :id || embed == :ids
|
||||||
end
|
end
|
||||||
|
|
||||||
def embed_objects?
|
def embed_objects?
|
||||||
[:object, :objects].include? embed
|
embed == :object || embed == :objects
|
||||||
end
|
end
|
||||||
|
|
||||||
def embeddable?
|
def embeddable?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user